3

I have a vanilla Joomla installation. I installed RSForm plugin to send emails from Contact Us form.

However, when the user fills out the form get the message: SMTP connect() failed

I tried to change the settings on joomla to send emails from Gmail.
Here are the mail settings of the configuration.php file:
Mail from: myname@gmail.com mailer = smtp sendmail = /usr/sbin/sendmail fromname = myname smtpuser: gmail username smtp password: gmail password smtp security: TLS SMTP Host: smtp.gmail.com

I can connect via SSH to the terminal of my server

After doing so and executing the Telnet command accessing smtp.gmail.com via port 587, this is what I get:

myserver:~# telnet smtp.gmail.com 587 Trying 173.194.79.108... Connected to gmail-smtp-msa.l.google.com. Escape character is '^]'.

At least we can see that it is connecting.

As far as the mail logs goes here I've looked at them and only can see sender of Joomla and not from myself

Thanks

  • What do you have on smtp user? Is it your full Gmail email address or just username without @gmail.com? – webchun Nov 11 '16 at 2:56
  • Good call @webchun ... username should be 'user@gmail.com', not just 'user'. – Mikan Nov 11 '16 at 8:50
  • Good thinking @webchun In smtp user I had just my username without the gmail. Following your suggestions, I changed it to ‘user@gmail.com’ instead of ‘user’, restarted the apache server, but it still doesn’t work. I get the same: SMTP connect() failed. message – mikeli Nov 11 '16 at 12:44
  • One thing to check is Google restricting access from "less secure" applications. You may (should) get a warning email from google that you tried to access w/ an insecure app but you have to check the underlying gmail account to see that (which often I miss, because the gmail account is just for teh web app and not set up on my phone or desktop client for example.) Find ore info on "less secure apps" here: support.google.com/accounts/answer/6010255?hl=en – JoelAZ Feb 6 '18 at 8:54
1

IMAP/SMTP do not work be default with Gmail accounts.

Probably need to enable less secure apps: https://support.google.com/accounts/answer/6010255?hl=en

0

I was once having the same problem, but not with Joomla (other platform).

The issue was suddenly happened (it worked good before). My server were able to connect gmail via telnet just like yours but when script was executed it's always returned SMTP connect failed.

I spent many hours to troubleshoot this with no luck. I checked the script, all firewall rules and everything was fine. And later, that was ended with my gmail account suspended by google said I’m violating their tos without any good reason.

So I think this issue probably comes from the google end. They are probably becoming too strict. I'd suggest you to use dedicated email service such as Sendgrid or Amazon SES (they are cheap) that indeed provide service for that purpose (transactional email service) while maybe google doesn't want their service to be used for that purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.