Getting rendered emails for Sandgrid Sandbox mode - sendgrid

I use SendGrid Sandbox mode and I get a response from API with 200 OK status code.
Is there a way I can check email content that I've created in this way?
I tried to find such Emails in SendGrid app or Google documentation for that. My first guess was that I will find such emails in Activity section of SendGrid app, but was not able to do it using email address I've sent emails to.
Thank you!

Related

sendgrid/mail wont allow sending 'from' to be dynamically

I have a form on my portfolio that allows a user fill in a form with a question they have and send that to me by email.
When i try to use sendgrid it only allows me as a verified user to send emails from my own email address. but i want the 'from' field to be dynamically filled in by that user and then sent to me.
note: I also tried 'emailjs' but that works fine in development but fails in production.
Any suggestions on how to fix this or any other platforms i can use for that preferabally free since it is a hobby project.
Thanks
Twilio SendGrid developer evangelist here.
You do need to use a verified email address to send emails from SendGrid, this is to stop people using a form like you describe to spoof anyone's email address.
A better idea is to send emails created in your form from a verified email address and set the reply-to address as the submitted email. That way you can send with SendGrid and then when you reply in your email client it will return to the person that submitted the form.
I added more detail and example code (in Python) in this answer.

SendGrid smtp not sending to Yahoo, AOL, or Verizon.net but sends to Gmail?

(Disclaimer I'm fairly new to development in general and this is my first StackOverflow post all and any feedback is greatly appreciated.)
I'm posting here because I'm on a free SendGrid account and their support team has yet to get back to respond and it's been over a week and I'm dying to solve this issue.
Currently, I'm using Sendgrid as an SMTP and recently my emails have stopped sending to the following esp Yahoo, AOL, and Verizon.net but emails send to Gmail just fine.
Because emails still send to Gmail I used "Email Header Analyzer" via mxtoolbox.com to review and meet the recommendations provided. Which I have implemented on. (See screenshot)
The only thing not checked off is the "DKIM Authenticated" in which it's my understanding that when you verify the domain you're using to send emails with SendGrid takes care of that for you.
It's not the email function itself because it sends just fine to Gmail.
My question is has anyone else experienced this issue? If so what was the fix you did that made it work?
Screenshot of my email header analyzer results:
Turns out that my SendGrid account was over the daily email sending limit for the "free plan" and the emails that were sent correctly to Gmail had been doing so because of a pre-existing mail function (not using SendGrid even though SendGrid was still logging these emails).
I figured out this was happening by looking at the "mailed-by:" info when you toggle the drop-down above the email just under the sender email address. Mailed-ByView With SendGrid it would say "mail-by: sendgird.net" SendGird-Mailed-ByView
It would have been nice if SendGrid made my sending limit information a little more apparent but you can find this information about your account by going to "Settings">"Account Details">"Your Products." YourProductsView

Google now cards not being created on Live

When I send email, using http://gmail-actions.appspot.com/ cards are being created, however on production using amazon ses email service, cards are not being created, However I can see all tags need for creating tag in the email body.
Please suggest!! Thanks
#ashish If you're using Gmail Schemas in your production environment (xxx#yourcompany.com), you will have to register and be whitelisted for the feature. Your email will have to go through their quality checks and you will also have to send a sample email with the markup included.
You can find the guidelines to register at the link below.
https://developers.google.com/gmail/markup/registering-with-google

Send email from my custom mailgun SMTP address

Sorry if I have not understood something but (I believe) I have searched enough for this.
First things first: I have successfully set up my domain (mydomain.gr) which has been verified.
I have created a custom SMTP address (contact#mydomain.gr).
I have created a route which forwards everything sent at *#mydomain.gr to my personal Gmail address.
Test 1: If I send an email from an external address (something#something.eu) to contact#mydomain.gr it is forwarded to my personal Gmail. OK!
Test 2: If I send from contact#mydomain.gr to any external address (something#something.eu) I get the error Free accounts are for test purposes only. Please upgrade or add the address to authorized recipients in Account Settings. Of course the password is correct while sending. Otherwise another error is raised.
I think I have missunderstood some things...
So here comes my question:
How can I send email from my custom SMTP email address? (I do not wish to upgrade my account since this -free- Mailgun account will handle very small amount of emails. So, 10K are more than enough for me.)
OK. After some emails with the mailgun team I finally figure it out!
All I had to do was to upgrade my account (just enter credit card info). Now I can send email from contact#mydomain.gr to anyone.
Thank you mailgun!
I have also contacted Mailgun for the issue and get response back within few minutes:
This error occurs whenever utilizing either a sandbox domain or a free account without inviting users called Authorized Recipients.
Sandbox domains always require Authorized Recipients. With free plans, which are intended for test usage, all custom domains require Authorized Recipients. With upgraded plans, which are intended for production usage, custom domains no longer require Authorized Recipients.
Please take a look at the following Help Center article for more information about the Authorized Recipient process:
https://help.mailgun.com/hc/en-us/articles/217531258-Authorized-Recipients
Then I have add the Authorize Recipients and it works like a champ!

Sendgrid returns 202 but doesn't send email

I'm trying to get the basic "hello world" of sendgrid working, but have so far been unsuccessful. The response returns code 202, suggesting that it will send the email, but the email never sends out. Does anyone know what's going on?
import sendgrid
sg = sendgrid.SendGridAPIClient(apikey='**my-api-key**')
data = {
"personalizations": [
{
"to": [
{
"email": "me#gmail.com"
}
],
"subject": "Hello World from the SendGrid Python Library!"
}
],
"from": {
"email": "me#gmail.com"
},
"content": [
{
"type": "text/plain",
"value": "Hello, Email!"
}
]
}
response = sg.client.mail.send.post(request_body=data)
print(response.status_code)
I just had this issue: I created an account with SendGrid and tried to get the basic example working, the API would return a 202 response, but the email was never sent, and the SendGrid web UI's activity feed showed no activity.
I submitted a SendGrid support ticket and ~8 hours later received a response saying that they had disabled my account's ability to send emails:
Hello,
Thanks for contacting SendGrid Support!
It looks like your account has been closed by our compliance team and this is the cause of the issue.
To reactivate we’d like to know a little more about the email you’ll be sending through SendGrid. Please elaborate on the following:
The nature of your business, the services you provide, and your potential customer base
Your sending frequency and volume
How you collect your recipient addresses (link to opt in page, or sign up process)
How you will allow your recipients to opt out of your emails (whether you plan to use SendGrid’s one-click unsubscribe feature, or if you have your own method)
The types of messages you will be sending (transactional or marketing)
Please reply at your earliest convenience in order to continue the activation process. Thanks for your cooperation!
~15 hours after submitting my answers, I received a response saying my account had been "activated":
Hi nathan.wailes,
Thanks for the additional information! Your SendGrid account has been
activated, and can now be used to send email. To get started, check
out our Getting Started page.
If you hit any snags while you're getting set up, you can find
solutions to common problems and FAQS in our Knowledge Base.
Let me know if you have any more questions!
Best,
Stevin O.
Associate Support Engineer
When I then ran the basic example code with my email address set up as the recipient, the email showed up immediately in my Gmail inbox.
Debug this by going to the sendgrid api log here:
https://app.sendgrid.com/email_activity
In my case, it was a DMARC receiving domain block.
The 202 Accepted Status Code returned from SendGrid does not really indicate that the message has been successfully delivered to the recipients inbox. It indicates that the message is valid and has been "Queued For Delivery". Now, it is up to the receiving server to deliver this message to the recipients inbox, or to send it to spam, or simply drop the message.
There are several reasons as to why messages that returns 202 Accepted Status code from SendGrid does not actually get delivered to the recipients inbox.
For example:
Invalid email address: The email address may no longer be valid (example, when an employee stops working at some company, their email might be removed from the company's system removing the ability to receive any email).
Blocked Emails: If the sending IP or domain is blocked or if the recipients inbox provider has some filters set up such that some specific content of your email/campaign is considered spammy and thus gets automatically blocked.
Another thing to note is that SendGrid may send the messages to spam/junk if the domain authentication has not been properly set up. So make sure that your domain is properly authenticated.
Here is the link to the documentation from SendGrid that explains these event in details. https://sendgrid.com/blog/delivered-bounced-blocked-and-deferred-emails-what-does-it-all-mean/
I had same issue and solved it by adding new api key with full access
In case someone will come across this looking for an answer to a similar problem. I solved the same problem by confirming the domain with DNS records - after that everything worked like charm.
In Sendgrind: Setting > Senders Authentication > Domain Authentication
For us, the problem was that the used dynamic template was not yet set to "active". Unfortunately no error was shown about the in the API response or the log.
Activating the email template solved this and emails are no longer dropped.
The same issue occurred when DNS is not verified and you are not using register email in from email.
Just change from email to register email.
I recently got the same issue. My e-mails were not sent without any reason, the response status was 202, e-mail activity was empty. The possible solution is to add a company details and add an unsubscribe block to e-mail. That worked for me.
I'm implementing a password reset feature and it's a little weird to have an unsubscribe block for this. I'll try to figure out what was the real reason of such silent suppression. Probably it's because I tried to send a draft debug e-mail several times which was looked like a spam. Maybe SendGrid has some smart algorithms for detecting this.
I also had this issue. I contacted sendgrid support however while waiting I changed the dummy data to real data I was calling sendgrid API with and then it started working.
in particular I changed the from email address to show my own domain.
For me the template was the issue. When using the template engine make sure to use {{variable}} instead of {{ variable }}. Afterwards I received the emails as usual.