Auth0 - Sendgrid not sending Email but working on test email - email

I have just begun working with an account that had been set up by someone else using Auth0 and Sendgrid to handle email verification.
Ever since the 11th of December, the whole thing just stopped sending emails out of the blue. We thought it had to do with payment plan but even after the upgrade it didn't change anything.
But here's the weird part: When we send a test email the whole thing works perfectly, but when we try to re-send authentication email it doesn't.
Does anyone have any clue as to what might be going on? We've checked settings and price plan and neither are any different to other accounts with the same set-up, yet it hasn't been working since the 11th.

I work with the Auth0 Community team. Are you seeing anything in the logs about emails failing to send? Are verification emails turned on for your tenant? We also have a step by step setup doc for setting up Send Grid which you could use for confirming your current setup which I've shared below. I hope this helps you in the path forward.
https://auth0.com/docs/email/providers#configure-sendgrid

Related

SendGrid mails are always in pending status

I am exploring to use SendGrid in one of my projects, I have followed the guide here: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/accconfirm?view=aspnetcore-5.0&tabs=visual-studio
after setting up the things, when I send emails, they are stuck at this point:
There are few other mails that I tried to send to Gmail, they are still in pending status.
The issue is that your account becomes inactive after a while. If you try to access the SendGrid after that period, you won't be able to send emails. You have to create a new account.
In December 2022, creating a new account didn’t solve the issue for me. And there was a notice banner on the top after the new account was created:
Your account is under review and we’d like to know a little more about you and how you intend to use Twilio SendGrid. Contact Us
So you have to contact the support team of SendGrid to remove the restrictions, which worked for me.
Creating a new account solves this issue.
I used the existing email to create new account and it worked fine for me.

Keycloak is sending HTML code inside password reset link

Yesterday I started noticing that the keycloak emails for required user actions are containing HTML characters inside the URL that is being sent for the required action.
example: /auth/realms/EasyDox/login-actions/action-token?key=eyJhbGciOiJIUzI1NiI
This of course gives me an error on the keycloak page
If I change the characters &#61 to = in the URL, it works fine and I am able to do the password reset.
Note that we are using mailjet to send emails through our custom domain.
I really don't know where the issue is since before yesterday everything was working fine, and I'm kind of lost on what to look for.
If anyone has any suggestions what to try since we have customers that are connected to this keycloak, and some of them can't log in since they forgot their password.
I managed to solve this by moving our mail sending from Mailjet to SendGrid. It had nothing to do with keycloak.

SendGrid Emails Getting Rejected as Spam

I'm making a user management system for my app, and I need to send users a "forgot my password" email with a token that lets them reset their account password. I signed up for SendGrid through Azure (to get the 25,000 emails per month free, which sounded like a great deal) and wrote some code to use it, but after testing my program a bit I was dismayed to find that only a couple of my emails actually went through.
After going onto the SG control panel, I found that 4 out of the 6 test emails I sent went through, and all of the others were rejected as being spam. I sent an email to mail-tester.com to see what it though my spam score was and it gave me a 4.3/10.
The email in question was a single sentence with a link to the password reset, without any images or other elements. I only sent those 6 emails out, so the volume of my emails definitely wasn't the issue. Still, I'm very puzzled as to why my messages are getting flagged as spam.
Without going to the trouble of making an elaborate authentication setup, are there any basic changes I can make to my system to make it get through to users?
In this case it's most likely because you are sending such a short message, with a link to 'reset your password' from a non-whitelabelled email address (the email address you're sending from cannot be verified against the actual domain), and the link may also be a different URL. It's probably getting pulled up as a potential phishing email.
You can rectify this by white labeling your domain and email links via the SendGrid dashboard, it's easy to do and should improve your deliverability.
Also check out this article from the SendGrid support team about White Labeling.
A question from 2015 which is sadly still relevant today as usage of SendGrid increases.
My organization has blocked all SendGrid mails except for those on the paid tier using fixed IP addresses with resolvable public DNS names (such as sendgrid1.sampledomain.tld) which we then whitelist.
There are now far too many domain impersonation, phishing and other spam mails coming in from SendGrid for us to allow everything from them - roughly 10 000 mails over a seven day period, which is far too many to manually report to SendGrids abuse department.
So my answer would be that switching to the paid tier of SendGrid is the better option if you like a better chance of your mails arriving intact at their destination.
I receive only Spam Mails from Sendgrid.
Goes direct to Spam folder and try to report Sendgrid everywhere I can. Maybe they get blocked by most mail servers and make them think about their policy in "hosting" all these Spammers.
In my case my emails are marked as spam because of the anchor label different to the href being actually called.
And that's because of the 'click tracking' setting of sendgrid.
So, if you have something like
yourdomain.com
sendgrid may replace the href and you end up with something like:
yourdomain.com
The sendgrid page being called tracks the click and then redirects the user to the url you originally set. But this sometimes results in your email being marked as spam.
Try to set 'click tracking' in sendgrid dashboard to off: settings | tracking | click tracking.
details here: https://sendgrid.com/docs/ui/account-and-settings/tracking/
Always start by setting up Domain Authentication, formerly known as domain whitelabel as #MartynDavies says. Found under Settings -> Sender Authentication in the UI. Should look like this:
https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/
To identify problems have a look at Activity and choose to see deferred, drops, bounces, blocks and spam reports.
https://app.sendgrid.com/email_activity
Under Suppressions you can see details for Blocks and Bounces among others:
https://app.sendgrid.com/suppressions/blocks
https://app.sendgrid.com/suppressions/bounces
There you can see errors like:
550 5.7.1 SPF check failed. em1234.mydomain.com does not declare 11.222.33.44 as a valid sender
If it says Verified but you see errors like this then contact SendGrid support.
One thing that has worked is to upgrade from the Free plan to Essentials or Bronze via the Azure Portal. This made a lot of the emails marked as spam pass through.
I had a similar issue when trying to send a user verification email using SendGrid.
In my case, using a custom domain as the sender identity solved the issue.
Make sure to also verify the domain before using it.

Service for testing bounced email handling

I'm sure this must exist, but I can't find anything anywhere that does this. What I want is some online service that provides an email address I can send an email to, and guarantee that it will always bounce.
The reason I want this is to test the bounce-handling functionality of a piece of software. Obviously I can use some kind of valid address that I know doesn't exist, but that doesn't seem like good practice, even though this is only for a one-off test, not something that will be automated (at least not yet).
Ideally, I'm looking for something like Mailinator, but where I can send messages, see them pending, and choose whether to bounce them, and what type of bounce.
Google did turn up this address bounce-test#service.socketlabs.com, but as far as I can tell, it's no longer bouncing messages, because when I try it I'm not getting anything back.
Any suggestions?
EDIT
As per John's post below, the service seems to be working again - tested on 30th September 2016 from Gmail, and got a bounce response within 5 minutes.
We have a bounce test email which we recommend to our customers and anyone is free to use it.
It just replies back:
:fail: No such person at this address.
The email is: bouncetest#tribulant.com
We have it listed in our documentation for our newsletter plugin for WordPress: http://tribulant.com/docs/wordpress-mailing-list-plugin/382#doc1
Hopefully someone will find this useful since there doesn't seem to be any easy way of testing bounces like this specifically.
I use bounce#simulator.amazonses.com for AWS SES.
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html
From the above page:
"You can only access the mailbox simulator by using Amazon SES. You cannot access it from an external mail server."
It's worth noting that bounce#gmail.com bounces, with a 'no such user'. To verify (even though the likelyhood was low), I attempted to create an account in gmail as bounce#gmail.com, and it failed stating it was already taken. So clearly google has reserved the address, and the only use it could possibly have is to generate bounces.
Even though - as of 07mar2019 - the bouncetest#tribulant.com still works, bounce#gmail.com is also a fair alternative.
Curiously, bouncetest#gmail.com....gets delivered. Whether there's a human on the other end is a question yet to be answered...
I work over at SocketLabs. First, I apologize that we are seeing this message so late. I just wanted to stop in and provide some follow-up on this issue for anyone who is still interested.
The SocketLabs bounce email address is working. I tested it on Friday, September 23, 2016 and successfully received a bounced message.
The address is bounce-test#service.socketlabs.com
I would suggest trying again. Or contacting support. Our support team is very responsive and friendly. Here's a link to reach the support staff. https://support.socketlabs.com/
http://www.socketlabs.com/blog/bounce-and-feedback-loop-test-addresses/
bounce-test#service.socketlabs.com
Since the Socketlabs service is no longer active and the SES simulator is only for sending from local SES accounts, I ended up having to use my own domains hosted at either Google Apps or cheap shared (CPanel) hosting:
For soft bounces, set up an email account and set it to suspended.
For hard bounces, send email to an invalid address (and make sure you don't have catch-all turned on)

What's the best way to give the user weekly updates from your program?

I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing some files that have been downloaded.
Initially, I wanted to sent this status update via email, so I looked into that but there are a lot of problems. I need an SMTP server so I looked at GMail. It's okay but has a daily limit of 500 emails, so this wouldn't be suitable for release. Also, there would be issues with the same email account password being given out in each copy of the program, which as I understand it, is a risk even if the password is stored using encryption.
Then I thought maybe I could use the user's own email account to send email to his/her self. This has a couple of complications too: the user would need to specify all of the smtp information for his/her email account, which is too complicated for the target user. Also, I don't want to have to have people entering their email account password into my program just to send emails. I don't think that's a good habit to promote.
Is there any way I could do this via email? Email was my first choice because it's a system of notification that users will already be checking. It's fairly non-intrusive.
Is it necessary to setup my own smtp server? If so, how can I do that?
If email is a no-go, I was also thinking about just generating a local HTML file with the relevent information, and then having a notification popup from the program once a week to inform the user that a new update report is ready. I think this is totally doable, it's just overly instrusive and not my first choice. I want to piggyback on a system that the user is already using.
Thanks!
-greg
An alternative is to have the program generate an RSS feed and direct the user how to subscribe to it. Also, once a new update is generated, show the update toast for about a minute, then hide it automatically and change your systray icon to something different. In about a day change it back to the original icon. Also, give the user a setting to turn the toast off permanently.
Relying on email is not a good idea, as you would have to collect the user emails and deal with the privacy issues for that, you would be effectively DOSing any third party SMTP server or would have to invest in the infrastructure for your own.
If I've understood it correctly, the user is running this program on his pc, in the background.
The perfect way to notify something would be, IMHO, giving the program is minimized to the traybar, a small popup that clicked, would open a window with a weekly report.
Hope this helps.
If you do get them to specify their own smtp server, make sure you put a "Send Test Email" button on there so they can test it. I know from experience that users always enter the wrong details when specifying a smtp server, user name, password, which is made worse since some smtp servers require a user name/password and others don't.
If they do enter the wrong details (or they change) then you might need to have some way to send them older reports, or to have some other way of notifying them that you can't send email.
Email's great, but you might need an alternative method also.
Google for simple smtp server windows gives you this
To be honest if you are just sending things once a week email is your best bet, as it's not frequent enough to garantee that the user will be at his machine to accept some other sort of request, which would require you to write proprietory software.
You could alternatively post it to an irc channel, or write an MSN bot to message the user, the message would be sent as an offline message if the user was offline.
I'd still go for email, it's tried and tested.
For a simple SMTP server I use hmail. I configure it to accept all SMTP requests from the local machine, regardless of source and destination, and to deny any SMTP requests not coming from teh localhost. This will be fine if you have a centrally located application.
If you want to distribute the app you have a whole different situation; with a lot of ISPs putting restrictions on SMTP traffic your best option would be to allow users to put in their mail account details and then use that to send mail. This will ensure everyone can put in working settings. Then use whatever library or pre-made code exists for yoru language of choice to send an email using those settings.
Does it need to be a weekly digest? Instead, how about using Growl (or equivalent) to notify the user of the tasks being completed in real-time, in the background?