SendGrid development environment - sendgrid

What is the best approach for SendGrid development QA environments? We'd like non Production environments that we can store and test our email templates via the API. The SendGrid sandbox setting doesn't allow emails to actually be sent.
Unless there is a better approach, we plan on creating new SendGrid basic accounts for $9.95 a month which allows up-to 40K emails. with this approach, our Dev and QA environments will have different accounts that we can test and deploy with.

I know this is an old question, but I would like to leave our solution here just in case someone else need it.
Sendgrid doesn't allow to have more than one environment, but you can test different content using their dynamic templates.
On your template you can set some conditionals if/elselike this:
{{#if isDev}}
<p>This is development</p>
{{else}}
<p>This is prod</p>
{{/if}}
And then, when you call the API for sending an mail you should pass the var like this (note: this is a Node example):
sendgrid.send({
from: EMAIL_FROM,
templateId: TEMPLATE_ID,
personalizations: [{
dynamic_template_data: {
isDev:(process.env.ENV === 'development'),
},
}],
});
Obviously this is not the same has having different environment, as you we are not testing the final email you will be sending on PRO, cause your metrics will be mixed and, if you test too much, it can impact your sending quota. But it will work if you just test minor changes to time to time like we do.

SendGrid does not have a UAT (User Acceptance Testing) type environment, so seperate users is their suggested solution.
My company took the approach to have different SendGrid users per environment. It allows API access and a separation of accounts, so a production account is not used in other environments. It could be tested using a free account for local or development work, and paid accounts for Staging, QA, or Beta type environments. SendGrid pricing has API access at all levels. Sometimes the trickiest thing with SendGrid testing is your limit on Subusers, which is limited at the lower pricing tiers.

Related

When using Azure Pipelines, SendGrid notifications can fail due to IP whitelisting. What alternative notification apps can be used?

When using Azure Pipelines, SendGrid notifications can fail due to IP whitelisting. What alternative notification apps can be used?
In my case, I must leave IP Whitelisting turned on in my SendGrid account due to its use in other applications and security requirements within the organization.
I do not have security requirements for the pipeline notifications itself, so another tool is fine. What is the best option: Can you think of a workaround for SendGrid via networking? Is a free gmail account useful for this type of thing, or is there another, better solution?
All I need is emails saying "Pipeline [abc] was activated and [passed/failed]", and I already have the pipeline code to check if it passed/failed and to fire a job, I just need to pick a job type and pick the right one!
Thanks for your time!

Test SendGrid Upsert Cron Job

Just trying to get the best method for testing adding/updating contacts via a cronjob without interfering with the current contacts list. Will I need to create a new account specifically for testing?
Twilio SendGrid developer evangelist here.
If you want to make requests to the API as part of your testing (which I normally advise against, as testing 3rd party services should be unnecessary), and you don't want to affect your data, then you don't need a completely new account, but you can use a Subuser account.

Send emails from static website hosted on google storage (using google services)

I just created a static website that is hosted on google storage. My domain is also registered with google domains and I have a business G suite account.
My static website has a 'contact us' form and I wonder if it is possible to use gmail or gsuite (or any gcp services) to send the content of the form as an email to my gmail address.
I know there's services like mailgun, etc. But I'd rather do it using tools from google if possible.
Does anybody know how to do this?
There is a very good option that you can use, within the range of Google products, to achieve the goal of sending emails via Contact Form, with your static website.
This option is actually easy and very simple to configure, I would say, which it's to use the serveless product Cloud Functions. To provide some context on it, you can make the functions trigger via HTTPS request, so it works with your site and you will be able to use it for free, for up to 625 thousands forms submissions per month. I would recommend you to give a look at it, in this complete tutorial here, where you can find the steps.
In addition to this option, you can use Mailgun as you mentioned, but in association with GCP products, to give you this service. You can use Mailgun to send the emails, Cloud Datastore to keep records of it and Cloud Functions to work with these two services. More information can be found in this similar case here.
To summarize, as you would prefer to use tools from Google, to follow the first tutorial, where you will be using Cloud Functions only, to configure your service.

Can we have separate URL set up for sendgrid webhooks for different environment like Test, Stage and Prod

I am trying to setup sendgrid webhooks for events fired when the emails are delivered etc. Is there a way to pass a URL like twilio or any other setting changes that allow me to add more URLS for different environments.
I am also trying to differentiate between test and prod.
For example -
Test - test.callmebackwithInfo.com/sendgrid
Stage - stage.callmebackwithInfo.com/sendgrid
Prod - prod.callmebackwithInfo.com/sendgrid
After call with send grid and from the answers below. I added more sub-accounts. With each subaccount I can add different URL's.
The good thing is I can use the same email address with different username.
You cannot add 3 URLs or let Sendgrid decide where to call on the basis of your environment. However, your requirement is doable and below are 2 ways to achieve your requirements.
Set up 3 different Sendgrid accounts. This way for each environment you will have different webhook.
If you want to use one Sendgrid account for all of your environment, then you have to handle the webhook calls from Sendgrid and as per the environment set by you while calling the Sendgrid API yo would have to forward those calls. While calling Sendgrid API you can pass the environment in a unique argument and read the same when Sendgrid call you whenever any activity is done.

email distribution list through website

I'm looking for a commercial option for managing email distribution groups through a website. Members need to be able to subscribe and unsubscribe from distribution lists, but crucially, they need to be able to send emails to the group themseleves (unlike newsletter signups like constant contact).
I understand this kind of thing is possible through open source options such as mailman, LISTSERV, ecartis, majordomo etc. However, I'm not keen on installing python scripts, working with beta, unsupported versions etc.
I'm after a commercial, hosted solution which gives me an API that I can plug my website into. The API would need options to set up new groups and subscribe to and from them.
Any suggestions welcome.
Does this work: http://documentation.mailgun.net/api-mailinglists.html? If not, send us an email with feedback.