I have seen lots of discussion on the problem of sending mail from an amazon EC2 instance using php's mail function. None of the suggestions have worked with me.
Here is my setup:
- I have ubuntu EC2 instance.
- I followed the steps on Amazon's SES to install postfix using the credentials that were created for me. I tried both stunnel and direct methods.
- I used swiftmail transport to send my mail according to this. The transport function for sending a mail returns 0 delivered.
- I used php mail just by itself and it returns true. However, no mail is delivered not even in spam.
By the way I'm not using the production service with SES. The limits are fine with me, I just want it to work.
I suspect I'm not being authenticated properly and I don't see why. I tried to telnet ...amazonaws.com 25 and it gets connected. But when I tried the command Mail From: ... in telnet, it says authentication is required.
I have already thought of an alternative: sendgrid. Too expensive for my use.
Any thoughts?