views:

135

answers:

2

I'm thinking of setting up a simple web application that sends the user a confirmation email when they first register. If I build this on the Amazon Web Service infrastructure, how can I send email from another instance? I would probably have one instance that is just for the application and another instance for the email server.

My question is how does the first instance (the app server) know the IP address of the second instance (the email server)? It is my understanding that the instances can run on any number of servers and can be brought up and down. How does that allow one instance to connect to another instance?

+1  A: 

I'm not sure why you'd want to only send the e-mail from a single instance, since there's nothing special about sending e-mail. That being said, I'd look at a simpler coupling model like Amazon's Simple Queue Service.

Jim Zajkowski
Things like reverse DNS and the various anti-spam frameworks make a single originating point for email easier to set up.
Paul McMillan
A: 

Don't attempt to send email directly from an EC2 instance; it will not work reliably as the EC2 IP ranges have been blacklisted by various providers. You'll need to use a thirty-party service such as Google Apps.

Nestor