How to use Gmail to send email in Opencart

We can use Gmail SMTP settings to send mail in opencart.
 Go to System -> Settings -> Mail tab

Select Mail Protocol: SMTP

SMTP Host: ssl://smtp.gmail.com

SMTP Username: your gmail username

SMTP Password: your gmail password

SMTP Port: 465

Opencart Email Settings





































Note:
Your gmail account  should have 'Access for less secure apps'.
Turn on following,
https://www.google.com/settings/security/lesssecureapps

12 comments:

  1. @gmail.com is optional for the gmail username entry. Gmail might prevent the email by sending you an alert "Suspicious sign in prevented" . It also give you the option to confirm it is actually you sending the email.

    ReplyDelete
  2. Excelente!!!!!! funcionou pra mim mas tive que aumentar o SMTP timeout para 30 segundos.

    ReplyDelete
  3. I have a problem with my shop when some ones writes an enquiry I get email from xyz@domainname.com (here domain name is my domain name) instead of customer@emailaddress.com.. any idea how it can be sorted out?

    ReplyDelete
  4. Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in E:\APM_Setup\htdocs\system\library\mail.php on line 153Notice: Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0) in E:\APM_Setup\htdocs\system\library\mail.php on line 156

    Hi, It's the error message. Help me.

    ReplyDelete
  5. thanks buddy. i just confused where finding ssl/tls setting, in your article it must attach ssl:// on host fillet.

    ReplyDelete
  6. Thank you Samera Jayasekara.

    Thank to your instruction. I follow what you say below:

    Select Mail Protocol: SMTP
    SMTP Host: ssl://smtp.gmail.com
    SMTP Username: your gmail username
    SMTP Password: your gmail password
    SMTP Port: 465

    the above did not work. Then I changed the port to:

    SMTP Port: 587

    It Works!

    ReplyDelete
  7. Tharaha nethuwa kiyapanko hotmail walata kohomada setup karanne kiyala ? i'm getting the same fucking error each time "mail@domain.co.uk"

    ReplyDelete
  8. Nice post and i configured it for my website Thanks

    website

    ReplyDelete
  9. Good morning,
    I have a problem with the settings of the email in OpenCart 2.1
    My settings are:

    Mail Protocol: SMTP
    SMTP hostname: smtpout.secureserver.net
    SMTP Username: info@lecoccolekids.com
    SMTP Password: xxxx
    SMTP Port: 465
    SMTP Timeout: 5

    with ssl enabled.

    The error that gives me is:
    1/27/2016 7:22:34 - PHP Notice: Error: EHLO not accepted from server! in /home/kids2/public_html/eshop/system/library/mail.php on line 199

    While if I put:

    SMTP Port: 3535
    SMTP Timeout: 5

    with ssl disabled.

    He tells me email sent, but the email does not arrive and the error log does not give me no errors.

    Services that the service has not been able to help me!
    Thank you!

    ReplyDelete