Sending mails with Gmail SMTP


#1

Hi,
I’ve spent hard time to send quotes and invoices by email using SMTP method and my gmail account. Finally, it worked out entering “ssl://smtp.gmail.com:465” in the SMTP server adress field.
I beleive this is the only method to make it work with encrypted passwords.
Hope it can help someone !
Romain


#2

Hi, i’ve got a possible solution for GMail
but in french
https://www.hostinger.fr/tutoriels/utiliser-serveur-smtp-gmail/

Otherwise, you can use a solution like mailjet.fr to allow you to use a SMTP and to monitor email openings for free for 200 mails / days.
It’s works in english too


#3

Mailgun offers up to 10.000 emails per month for free. Using it for several years now without any problems.


#4

Hello,
So, I’ve been having trouble setting up SMTP email config. I’ve tried moving the parameters using mailjet too but I get this error:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Looking the error logs I get:
EBUG - 2018-11-09 20:33:02 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2018-11-09 20:33:02 --> Mailer MX_Controller Initialized
DEBUG - 2018-11-09 20:33:02 --> Config file loaded: /home/OP/public_html/client/application/config/invoice_plane.php
DEBUG - 2018-11-09 20:33:02 --> Encryption: Auto-configured driver ‘openssl’.
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/settings/models/Mdl_settings.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/settings/models/Mdl_versions.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/controllers/…/modules/layout/controllers/Layout.php
DEBUG - 2018-11-09 20:33:02 --> Layout MX_Controller Initialized
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/invoices/models/Mdl_templates.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/invoices/models/Mdl_invoices.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/email_templates/models/Mdl_email_templates.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/custom_fields/models/Mdl_custom_fields.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/layout/views/alerts.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/email_templates/views/template-tags.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/upload/views/dropzone-invoice-html.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/upload/views/dropzone-invoice-scripts.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/mailer/views/invoice.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/layout/views/includes/head.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/layout/views/includes/navbar.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/layout/views/includes/fullpage-loader.php
DEBUG - 2018-11-09 20:33:02 --> File loaded: /home/OP/public_html/client/application/modules/layout/views/layout.php
DEBUG - 2018-11-09 20:33:02 --> Total execution time: 0.0514
DEBUG - 2018-11-09 20:33:03 --> UTF-8 Support Enabled
DEBUG - 2018-11-09 20:33:03 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2018-11-09 20:33:03 --> Upload MX_Controller Initialized
DEBUG - 2018-11-09 20:33:03 --> Config file loaded: /home/OP/public_html/client/application/config/invoice_plane.php
DEBUG - 2018-11-09 20:33:03 --> Encryption: Auto-configured driver ‘openssl’.
DEBUG - 2018-11-09 20:33:03 --> File loaded: /home/OP/public_html/client/application/modules/settings/models/Mdl_settings.php
DEBUG - 2018-11-09 20:33:03 --> File loaded: /home/OP/public_html/client/application/modules/settings/models/Mdl_versions.php
DEBUG - 2018-11-09 20:33:03 --> File loaded: /home/OP/public_html/client/application/controllers/…/modules/layout/controllers/Layout.php
DEBUG - 2018-11-09 20:33:03 --> Layout MX_Controller Initialized
DEBUG - 2018-11-09 20:33:03 --> File loaded: /home/OP/public_html/client/application/modules/upload/models/Mdl_uploads.php
DEBUG - 2018-11-09 20:33:03 --> Total execution time: 0.0536

Any suggestions ?
Thanks!


#5

Hi,
Could you paste parameters?

Are they like this ?


#6

Hi, they’re Very similar,

Another thing is that my hosting provider enabled SSL (AutoSSL ) for my domain. I’m not sure if that’s causing more trouble. Should I keep it or disable it?


#7

Keep your provider config.

Test with no to the last thing about certificate.


#8

I’ve changed the Verify SMTP field to “No”, still same error:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

What could it be?


#9

It could be :

  • a bad SMTP username
  • a bad SMTP Password
  • a bad SMTP Port blocked by your provider, test SMTP Port 25 or 587 and if it doesn’t work, test 587, 25 or 465 with TLS

Good luck


#10

Look at the begining of this topic. Try “ssl://in-v3[…].com:465” in the SMTP server adress