SMTP Mail not sending - Codeigniter Email Library |
I'm having issues in sending mail through SMTP Protocol.
**Welcome.php** PHP Code: $this->load->library('email'); Here is the output error: Code: An Error Was Encountered Quote:Note: The script is working fine on localhost, as well as multiple other hostings but not working on VPS Hosting. These are the things to remember: 1. The code is fine (Tried in different hosting and it works) 2. Changing $config['protocol'] = "smtp"; to $config['protocol'] = "sendmail"; it works. But I want to send mail only through SMTP Protocol. 3. Using Zoho Mail SMTP Protocols (smtp.zoho.com) 4. Tried, Google SMTP, Still not sending. (Used PHPMailer Library to test with the credentials. It's working on them.)
You need to add the SMTP server and PORT to your php.ini file.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Like I mentioned you need to edit the php.ini file usually it's in the php folder on development machines.
I use my internet providers settings like below [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.comcast.net ; http://php.net/smtp-port smtp_port = 587 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-01-2018, 04:17 AM)InsiteFX Wrote: Like I mentioned you need to edit the php.ini file usually it's in the php folder on development machines. anburocky3 use $config['protocol'] = "smtp"; and not $config['protocol'] = "mail";. The config will not work... .
The problem was fixed! The culprit was Valid Hostname & Reverse DNS. Thank you.
(More info here) - https://stackoverflow.com/questions/5110...6#51133416
In my case I cant make it work at first using this config:]
define('SMTP','true'); define('SMTP_host','mail.example.com'); define('SMTP_user','[email protected]'); define('SMTP_pass','xxxxxxxxxxxxxxxxx'); define('SMTP_port','465'); then, I just change the port to 2.. and all are just fine now!
No SEO spam
That's not a secure port number.
The port is setup in your php.ini file like I mentioned above. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-02-2018, 02:56 AM)anburocky3 Wrote: The problem was fixed! The culprit was Valid Hostname & Reverse DNS. Thank you. How do you fix this case? Can you elaborate the steps? Thank you |
Welcome Guest, Not a member yet? Register Sign In |