Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
Thanks for the tutorial, it’s very clear and easy to follow. I have a problem though, and I’ve exhausted every method I can think of to solve it.
When using the sample PHP script above to send the message (through gmail), I get the following error:
errormsg=‘authentication failed (method PLAIN)’ exitcode=EX_NOPERM
I have followed the config settings to the letter, checked the php.ini path, etc. but to no avail. Any suggestions on where to start looking to solve this?
By the way, I can tell than an attempt to send the message through gmail was made because I received a message from Google about an unauthorized attempt to send email through my account. I double checked the password, file settings, file location, but all seems correct.
@wizardware: Google prevented the login so php was unable to send the message. Try to see if you can whitelist your app from your gmail account’s settings.
Bingo! That did the trick, problem solved. Thank you Kamal, I doubt I would have ever thought of this.
It looks like msmtp expects to see the system wide config file in /etc/msmtprc in spite of what you put in the sendmail path. You also need to change the SMTP port to 587 to work with gmail - at least for my paid Google Apps account.
Ignore my comment - i’d missed out the chown. After some sleuthing, I found the reason!
CentOS 6.4 x32 does not send e-mail in error: “msmtp: support for TLS is not compilled in”. How to fix the problem?
This method is not safe to use on shared environments, since the gmail/yahoo password is exposed and readable by any apache user.
Hi there, great guide! It’s helped a lot, but I seem to be having issues getting the actual PHP to work.
Using command line msmtp command seems to work correctly, however using the PHP file sends back the failiure message. Just running “php mail.php” sends a “Authentication Failed (xxx Too Many Login Attempts)” which really confuses me. How could the command line email pass authentication but not the php file?
Thanks!