I currently have a site where the data is hosted on Firebase and the static files are hosted on AWS (I registered my domain using NameCheap, but am routing to AWS using Route 53 and S3).
I now want to use SendGrid to send emails, but they are saying that I need to set up an SMTP server. I can't find anywhere what the best way to do this is. Can I get suggestions please on the best solution? I want to use SendGrid to send transactional email such as "Welcome to the site!", "Forgot Password", etc.
There seems to be some misunderstanding here. You don't need to setup an SMTP server (that's the whole point of using a provider like SendGrid or SES). However, firebase is all client-side code, so if you want to do things like send emails or integrate third party APIs or do heavy computation that is not feasible on the client side, you'll have to have some server-side code running somewhere to manage those things.
You can read more about this in the Firebase FAQ
Update You can now achieve this using Firebase's integration with Zapier: https://www.firebase.com/blog/2013-11-25-fireabase-to-apis-with-zapier.html
Is there a reason you want to specifically use sendgrid? If you are already running on aws, you could use AWS SES instead. I've had nothing but problems getting sendgrid to work and finally gave up; with SES you can be up and running in minutes.
http://aws.amazon.com/ses/
Related
I have a website hosted on S3 on amazon web services. I want to receive emails on my gmail account from the visitors of my website if they wish to contact me. I'm confused with the steps for the setup as I tried working around with SES on amazon web service but am completely off tracK I believe.
Thanks.
S3 doesn't support any server-side code, such as PHP - so you can't use server-side logic to send an email.
There are two options:
Implement a mailto: link that will cause the user to open their mail client when then click on it.
Use a third-party mail service that supports a REST API, and implement that in Javascript. You can use something like SES, Sendgrid or Mailgun.
Each of these services can be called using Javascript. Implement your mail form page to make an API call to these services to deliver the comment to your inbox.
You can use AWS Lambda with Amazon API Gateway to create a serverless backend and use Amazon Simple Email Service to send an e-mail. A good tutorial below:
Create Dynamic Contact Forms for S3 Static Websites Using AWS Lambda, Amazon API Gateway, and Amazon SES
Late to the party, but as others have said you can setup a AWS Lambda function at an API Gateway to use AWS SES to send an email. You post your html form to it (or some other service you create on an actual server you control) and send an email via some Gmail SDK/API There's quite a few tutorials for this online.
You can also use a free third-party service like Formspree to create an html form that posts to their servers and they will send you an email to wherever you specify.
I am trying since a last few weeks to setup an email, for example,info#domainname.com, in aws Amazon SES
I tried some of the links:
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-email.html
I even went through a similar question marked closed on Stack Overflow:
How to set up Amazon SES to send and receive emails
But couldn't finish the setup correctly. Would anyone please help me to finish this task?
For your reference, I am using Free tier AWS account and have the domain attached to my Godaddy account.
When you say you want to send and receive emails, what do you mean ?
Generally SES is used to send emails from an app that you run and you want this service to handle all the posting for you, from doc - why use Amazon SES
Building a large-scale email solution is often a complex and costly
challenge for a business. You must deal with infrastructure challenges
such as email server management, network configuration, and IP address
reputation. Additionally, many third-party email solutions require
contract and price negotiations, as well as significant up-front
costs. Amazon SES eliminates these challenges and enables you to
benefit from the years of experience and sophisticated email
infrastructure Amazon.com has built to serve its own large-scale
customer base.
The receiving part as noted in doc
When you use Amazon SES to receive messages on behalf of your verified
domains, you can configure Amazon SES to deliver your messages to an
Amazon S3 bucket, call your custom code via an AWS Lambda function, or
publish notifications to Amazon SNS. You can also configure Amazon SES
to drop or bounce messages you do not want to receive.
so on receipt, SES will trigger rules that you have defined.
From your question, it sounds like you want to use a basic email client to do sending/receiving of emails, in this case Amazon provides another service called Amazon Workmail which you can compare with google apps.
If you're really looking into sending email from an app using SES, you can review this link which explains how to do it with GoDaddy
I'm new to Amazon SES and I see that there are two ways to programmatically send emails:
SES API (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-api.html)
SES SMTP Interface (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html)
What are the pros and cons of each method? They seem interchangeable to me, but I'd like to hear from folks who have had experience with SES.
In terms of my own requirements, I'll be sending transactional emails (i.e. receipts, account confirmation, etc.) and notification emails (i.e. "you have a new message", status change, etc.) to my users as they interact with my web and mobile app. If possible, I'd like to keep a history of all these outgoing emails.
The SES API ties you to AWS, the SMTP interface... well it's SMTP.
Do you foresee, in the future the need to move off AWS? Does your application already speak SMTP to another email server?
Depending on your current application it may be easier to go with SMTP.
If you're starting from scratch and don't foresee any need to move off AWS you should probably go with the SES API.
From Amazon's documentation on improving throughput, one advantage the API is the option of using persistent HTTP connections for increase throughput. This is not available to the SMTP option.
Apart from this, I have not been able to find any other major differences between the API and SMTP.
By using the SES API, you are using the SDK, so you can use Roles on your instances: you won't have to handle and store a password for your configuration, so you won't go through the pain of changing the password.
I released a small project https://github.com/loopingz/aws-smtp-relay
to relay from a localhost SMTP to SES API, this way you can connect legacy applications that only handles SMTP to a more normal SES API
They seem interchangeable to me
That's a fair analysis. I use both -- API for new code, SMTP for existing code that already knows how to speak SMTP. I haven't found a strong case either way.
Neither interface will preserve a history -- you'll have to do that yourself. One mechanism I'm working on for use with some legacy code is an SMTP proxy that captures the interaction between the app and SES, saving the entire transaction to S3 using the SES message ID as the S3 key for later retrieval if needed (still a work in progress, more pressing projects to do).
You, at minimum, need to preserve those message IDs returned by SES, and configure bounce, delivery, and complaint notifications so you have feedback... which also works the same with either interface.
So we are planning to use AWS SES for sending emails. But how do we set up the email receivers? And how do we create an email accounts? When activating AWS SES, it asks to verify an email account (eg. help#example.org)...
I tried to create a mail server on one of the instances using postfix following this article: http://flurdy.com/docs/postfix/, but it's not easy at all... Does anybody know any better alternatives?
Thanks.
SES is for sending email only. As you note, you must have some other way set up to receive email at least at the "From" address you intend to use, because Amazon will verify it before letting you send.
While you certainly could set up an email server and domain on an EC2 instance, it's very complicated. I recommend that you get an email service for just that purpose. If you only need a single address for all your messages, just get a free address from Google, Microsoft, Yahoo, etc.
If you need multiple addresses, consider getting Google Apps for Business, either for an existing or new domain name (it's easiest to set up if you have it register a new domain name for you). It's no longer free, but it's still quite cheap. A single user account can receive emails for every address in the domain, it's flexible, and it's reliable. It's a good companion to using SES for sending automated emails.
Use Amazon WorkMail if you prefer AWS. Gmail for work, Office 365, Hostgator, are some other examples. FYI, none of these providers simply provide domain emails. They come bundled with many other things such as chat clients, calenders, etc. Pricing of these services depends on what other things they are bundled with.
$4/user/month for AWS
$5/user/month for Google
$5/user/month for Microsoft
Since you are in AWS cloud, I will tell you a few things about Amazon WorkMail.
You get your own domain and 50GB of storage per user.
You get calendars for free.
You cannot use just any desktop mail client. You have to either use Outlook, or Mac's mail client, or the web interface. This is their weakest point. However, including other IMAP clients is in their roadmap (I guess atleast a year).
Integrates nicely with SES.
Important links:
FAQ page.
Features page.
There are many more features such as remotely removing emails from a device, managing your users, and so on.
What I can recommend you is to use Amazon WorkMail because they almost provide all the features supported by others, and you are tied with AWS anyway. AWS also recently launched Workspace and Workdocs (both separately billed) that will allow you to create a complete work solution. These services also combine nicely with IAM.
Here is my issue, I'm creating a website with a little login and resetting password. It's basic stuff, when user forget the password they can click the link and my application will send an email with a link to reset the password. Now, I'm using Google App to send/receive email so I created a new alias like noreply#company.com.
And I just got a confirm email from Google that I'm not allowed to use Google Server to send out email by JavaMail, because they do not support JavaMail as a mail client, the issue that I'm having is I'm getting AuthenticationException back from smtp.google.com.
Moreover, I'm using Amazon EC2 to host the application as well, and amazon provides SES service to send out emails. So, the question would be can I use Google App to host our company email for every employee, but can I still use Amazon SES to send out emails by JavaMail within the same domain name as we are using with Google Apps?. So, the emails that we'll be sending out would be noreply#company.com but will be from Amazon SES.
I'm not sure if I'm making this clear enough, my concern would be we redirect email MX Record to Google App already, I think we cannot redirect to Google and Amazon at the same time?
The application we are writing is based on Grails, so the email would be from Spring Email
Cheers,
Based on my usage of Amazon SES, you should be able to use the configuration you are suggesting without any issues. You do not need to add/change any MX record when using SES, because SES does not allow you to receive emails. It is only a service for sending (relaying) email messages, i.e., as far as I understood your needs, it will serve you perfectly, and your source email address will be the same as you use today.
When you sign up for SES and want to start sending test messages, you need to verify your source and destination email addresses before actually sending emails. You can achieve this verification through either scripting (ses-verify-email-address.pl) or API (VerifyEmailAddress on AWS SDK). After sending the verification request, you should receive an email address on the verified account. Just follow the message instructions and you can safely send some test messages.
When you are satisfied with your testing, you should request production access, and after this step, you no longer need to perform verification on destination e-mail addresses.
In order to call the API, I think you can use the AWS SDK for Java without problems in your application.
See more on:
http://aws.amazon.com/ses/
http://aws.amazon.com/sdkforjava/