Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Email From Amazon SES in ASP.NET MVC App

I host my web app which is written in .net mvc2 on amazon ec2. currrently use gmail smtp to send email. beacuse of google for startup email quota cant send more than 500 email a day. So decide to move amazon ses. How can use amazon ses with asp.net mvc2? How about configuration etc? Is email will send via gmail? because our email provider is gmail. etc.

like image 762
gandil Avatar asked Jun 17 '11 11:06

gandil


People also ask

Can I use AWS SES to send email?

With Amazon SES, you can send an email in three ways: using the console, using the Simple Mail Transfer Protocol (SMTP) interface, or using the API.


2 Answers

Send Email via Amazon is a right decision. Because when you move to amazon you will immediately get 2000 email free per day which is greater than googla apps 500 emails quota a day.

Step by Step:

  1. Go to http://aws.amazon.com/ses and click Sign Up for Amazon SES.
  2. To get your AWS access identifiers
  3. verify your email address - email which you will send email via. You need perl packages installled on your computer to test email features.
  4. include:amazonses.com to your dns record.

Step by step documentation. http://docs.aws.amazon.com/ses/latest/DeveloperGuide/getting-started.html

There is a Amazon SES (Simple Email Service) C# Wrapper on codeplex you can use this wrapper to send emails.

Amazon SES C# Wrapper

like image 167
gandil Avatar answered Oct 10 '22 21:10

gandil


Easiest way is to download the SDK via Nuget (package is called AWSSDK) or download the SDK from Amazon's site. The sdk download from their site has an example project that shows you how to call their API to send email. The only configuration is plugging in your api keys. The trickiest part is verifying your send address (and any test receipients) but their is an API call there too to send the test message. You will then need to log in and verify those email addresses. The email will be sent through Amazon (that is the whole point) but the from email address can be your gmail address.

like image 31
bkaid Avatar answered Oct 10 '22 21:10

bkaid