1 Answer
- Newest
- Most votes
- Most comments
1
I have never had an issue sending mails from EC2 in free tier. Can you confirm you have setup sendmail_from
and sendmail_path
in your php.ini file? Included a link with additional information.
http://php.net/manual/en/function.mail.php
answered 2 years ago
Relevant content
- Accepted Answerasked a year ago
- Accepted Answerasked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
I have just been reading about that and looking at my php.ini file. It says sendmail_from is for Win32 only. What should I put into sendmail_path? Do I need to install a mail program?
I do not have
/usr/sbin/sendmail
or/usr/sbin/postfix
Not entirely sure where you are at in the process but Install sendmail
sudo apt install sendmail
and make sure your local host is pointing to your hostname (/etc/hosts)127.0.0.1 localhost hostname
(w/e that is for your ec2 instance). Then you should be able to just runsudo sendmailconfig
refer to:https://manpages.ubuntu.com/manpages/xenial/man8/sendmailconfig.8.html
Restart your apache (or NGINX) for good measure. Any additional issues that result in no logs are generally config related to your php.ini file (typos etc causing issues) and sendmail_path not being pointed to your sendmail package.
postfix is just another package, like sendmail.