Email sent automatically from client’s site (like form submissions) using PHP Mail are no longer getting through to them. They had some email issues and it stopped working around the time it got fixed, so I imagine it was something on their end. Anyway, I tried to use SMTP instead for a gmail account and got some errors when I tried to send an email from the control panel…
Unable to send email at this time.
hello: F The following SMTP error was encountered: F Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Any ideas? I want to contact their IT people who handle the web hosting, but I’m not sure about what to ask from them. I’ve never had to setup any different outgoing mail system so I’m stuck at the moment. Thanks for any help!
Ah, caught this question from you on Slack. Posting here for posterity and searchability. 😊
Derek Jones [2:35 PM] SMTP with gmail is a tricky thing. You have to add some config vars and you have to create an app-specific password, and they have pretty tight quantity limits.
Mike Lohrman [2:36 PM] i think I got it worked out with some config variables
[2:36] still testing though
Derek Jones [2:36 PM] Does this work in a standalone script on the server?
<?php
mail('[email protected]', 'Subject of the email', 'Body of the email');
[2:36] if it doesn’t, I’d just point their server admins at that script, doesn’t get any more basic than that
[2:37] If it sends and just isn’t getting delivered, then they likely have local delivery enabled for their own domain on the server and need to turn that off.
Mike Lohrman [2:38 PM] this helped(http://expressionengine.stackexchange.com/questions/333/is-it-possible-to-use-gmail-as-the-smtp-server-for-sending-e-mail-from-expressio), I will also look into the local delivery. I think I’ve had that issue in the past. Unfortunately I don’t have access to the hosting to make things go quicker
Is it possible to use gmail as the smtp server for sending e-mail from ExpressionEngine? Is it possible to use gmail as the smtp server for sending e-mail out from ExpressionEngine? It looks like you need to be able to set a different port and i’m not sure you can do it from the E-mail
Derek Jones [2:39 PM] Yep, @kevinsmith’s answer is spot on(edited)
TJ Draper [2:39 PM] I don’t know if you can trust that dude…
[2:39] 😉
Mike Lohrman [2:43 PM] Derek, about the app-specific password you mentioned previosuly, is it possible to set one up so EE registers as a “Secure” app and then I can keep “Allow less secure apps” turned OFF?
[2:43] i turned it ON and things worked, turned it OFF and it stopped working
Derek Jones [2:44 PM] I think so?
[2:45] https://security.google.com/settings/security/apppasswords
[2:45] might only be on Google Apps for Business accounts, not sure
Mike Lohrman [2:47 PM] ok, will do more research
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.