I have added contact form for my Joomla 3.4.5 web site's contact page. All my mail settings in Configuration Manager are correct... But after submitting the message as a test intention, I get e-mail from Gmail that says

it has blocked a sign-in attempt by an application which does not complies with modern security standards

As a result, I get

SMTP connect() failed.

SMTP connect() failed.

My configuration.php file contains those lines in the following:

public $mailonline = '1';
public $mailer = 'smtp';
public $mailfrom = 'my_gmail_account@gmail.com';
public $fromname = 'FROM NAME';
public $sendmail = '/usr/sbin/sendmail';
public $smtpauth = '1';
public $smtpuser = 'my_gmail_account@gmail.com';
public $smtppass = 'my_gmail_account_password';
public $smtphost = 'smtp.gmail.com';
public $smtpsecure = 'ssl';
public $smtpport = '465';

PS: Authentication Gmail Plug-in is enabled.


This issue is because Google have locked down their email system and require's apps to be authenticated first. With Joomla! this isn't possible at present, so you need to enable the 'less' secure option on your gmail account. See:


Once done, set SMTP Security to TLS and Port to: 25 with Authentication enabled. Note, these can be configured in the Joomla! Global configuration. No need to edit a file.

Many thanks Tony

  • +1 for the explanation. Un +1 for the last tip. Configuration can be modified in both ways
    – zkanoca
    Nov 5 '15 at 16:50
  • You are welcome, depending on the server SSL will not always work, so as an answer it's easier to specify TLS to avoid confusion. Nov 12 '15 at 23:41
  • I have read what Google says about enabling less secure option. Then switched to it. But I still get that error..
    – zkanoca
    Nov 22 '15 at 17:45
  • @zkanoca did you try as tls? What are your settings now? Nov 22 '15 at 17:49

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.