Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Mail Using Amazon EC2 Instance

I am using Amazon EC2 Instance for one of my project, I have installed LAMP on linux server and now while I am trying to send email using simple function it is not sending email also is not giving any error for that.

Things I have done so far.

  • Created SES account.
  • Used simple mail function.
  • Enabled port 25 in security groups.
like image 889
sourabh kasliwal Avatar asked Nov 08 '13 11:11

sourabh kasliwal


People also ask

Can I send email from an EC2?

If you're using Amazon SES to send email from an Amazon EC2 instance, you should also complete the following steps: You may need to assign an Elastic IP Address to your Amazon EC2 instance in order for receiving email providers to accept your email.

Which AWS service can be used to send emails?

Amazon Simple Email Service (SES) is a cost-effective email service built on the reliable and scalable infrastructure that Amazon.com developed to serve its own customer base. With Amazon SES, you can send transactional email, marketing messages, or any other type of high-quality content to your customers.


2 Answers

If you are using a amazon ec2 ami/linux distro use "sudo yum install sendmail" while in SSH

like image 159
William Worley Avatar answered Oct 31 '22 01:10

William Worley


I solved this issue just by installing sendmail in my instance. Just run bellow command in your terminal

sudo apt-get install sendmail

That worked for me

like image 45
PabloQ Avatar answered Oct 31 '22 00:10

PabloQ