Welcome Guest, Not a member yet? Register   Sign In
SMTP Email having problem with Gmail/TLS connection
#1

I have my site running on CodeIgniter and I am using SMTP credentials to send email. The smtp host that I am using is smtp.gmail.com and with a TLS protocol. The issue that i am having is that the emails are received sometimes and not always. Initially only one of the test gmail accounts was receiving all emails and any other account did not get email. I studied different forums and found that Gmail doesnot allow less secure apps/websites to easily send email and that the security settings on smtp account should be enabled to allow connecting less secure website. I did that and now many of the email clients (gmail/yahoo/yopmail and few domain accounts) do get email but thee are still FEW of them that does not get any single email. Any ideas why? Quick help will be highly appreciated.
Reply
#2

It would help if you posted your email config settings here without your login and password.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 02-27-2016, 09:14 AM by skunkbad.)

PHP Code:
$cfg = [
    'protocol'     => 'smtp',
    'smtp_host'    => 'ssl://smtp.gmail.com',
    'smtp_port'    => '465',
    'smtp_user'    => '[email protected]',
    'smtp_pass'    => 'MyDumbPassword123',
    'smtp_timeout' => '30',
]; 

This works for me, all the time.

You might need to go into gmail settings and tell them to allow all email from the app. Some kind of "untrusted app" setting.

Your email not always going through is a good reason to implement a custom mail queue. You can always resend an email if it is in the queue.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB