10

I am getting familiar with Amazons EC2. I installed a LAMP setup but when I try to send emails through the mail() function that I have in my pages it does not work. I checked and sendmail is running and is on the phpinfo page.

I have tried changing the php.ini sendmail_from and it does nothing. SMTP port is open on the firewall... im freakin lost..

Quinton Pike
  • 3,823
  • 8
  • 31
  • 37

2 Answers2

11

This won't directly solve your issue (edit: I mean the error message you have now edited out), but Amazon EC2 instances have a really spotty mail reputation. You're probably going to have deliverability issues.

Thankfully Amazon created the Simple Email Service to go along with EC2, with a free level of service for EC2 customers. The API is pretty simple and there are transport adapters for many excellent PHP mailing libraries, like SwiftMailer (transport).

Charles
  • 50,943
  • 13
  • 104
  • 142
7

Please install sendmail extension, I solved this issue just by installing sendmail in my instance.

Just type: sudo apt-get install sendmail in your terminal.

That worked for me

Raju Dudhrejiya
  • 1,637
  • 2
  • 15
  • 16