Welcome Guest, Not a member yet? Register   Sign In
Email SMTP godaddy
#1

I am having the errors of: 
fsockopen(): unable to connect to smtp.gmail.com:465 (Connection refused)

Message: fwrite() expects parameter 1 to be resource, boolean given

And I tried to ssl://smtp.gmail.com and google.com: 


            $config['protocol'] = 'smtp';

            $config['smtp_host'] = 'ssl://smtp.gmail.com';

            $config['smtp_port'] = '465';

            $config['smtp_timeout'] = 5;

            $config['smtp_user'] = '[email protected]';

            $config['smtp_pass'] = 'XXXXXX';

            $config['mailtype'] = 'html';

            $config['charset'] = 'iso-XXXX-1';

            $config['wordwrap'] = TRUE;

            $config['crlf'] = '\r\n';

            $config['newline'] = '\r\n';

            $config['bcc_batch_mode'] = FALSE;
            $config['bcc_batch_size'] = 200;

And also I don't know where to access my php.ini? 
Reply
#2

(02-27-2016, 06:47 PM)goneewindy Wrote: I am having the errors of: 
fsockopen(): unable to connect to smtp.gmail.com:465 (Connection refused)

Message: fwrite() expects parameter 1 to be resource, boolean given

And I tried to ssl://smtp.gmail.com and google.com: 


            $config['protocol'] = 'smtp';

            $config['smtp_host'] = 'ssl://smtp.gmail.com';

            $config['smtp_port'] = '465';

            $config['smtp_timeout'] = 5;

            $config['smtp_user'] = '[email protected]';

            $config['smtp_pass'] = 'XXXXXX';

            $config['mailtype'] = 'html';

            $config['charset'] = 'iso-XXXX-1';

            $config['wordwrap'] = TRUE;

            $config['crlf'] = '\r\n';

            $config['newline'] = '\r\n';

            $config['bcc_batch_mode'] = FALSE;
            $config['bcc_batch_size'] = 200;

And also I don't know where to access my php.ini? 


If you've never been able to get a single email to send, you might check with Godaddy to see if they have port 465 blocked. While you're on the phone with them, you can ask them about the php.ini.
Reply
#3

It works on my localhost where I can message and email the message to myself. 
But it's not working on the live host. 


I called them, they told me standard port is 25.
And I needed to change it to remote email under MX Entry. 

I changed          $config['smtp_port'] = '25'; instead of 465 
but it is still giving me the same errors. 

Is there any other way around this ? 
Thank you
Reply
#4

(02-27-2016, 10:22 PM)goneewindy Wrote: It works on my localhost where I can message and email the message to myself. 
But it's not working on the live host. 


I called them, they told me standard port is 25.
And I needed to change it to remote email under MX Entry. 

I changed          $config['smtp_port'] = '25'; instead of 465 
but it is still giving me the same errors. 

Is there any other way around this ? 
Thank you

No, and it's never going to work because you can't send SMTP email through gmail on port 25. It could be painful, because switching hosts can be tedious if you've got a large site or many websites, but it's a common opinion that Godaddy is not a good host, and you really should switch. I good host doesn't block port 465 and tell you to use port 25. A good host doesn't modify your response headers, telling you that it's your code, and then you prove them wrong and they say they won't do anything about it. A good host doesn't immediately blame you for every little thing that goes wrong with your site. Do you see where this is going?
Reply
#5

I called them and they told me that they have the ports unblocked including 465. 

I just want to be able to have my site visitors to message me in a form and send that message directly to my e-mail. 

If there is any other way around this, please let me know
Thank you
Reply
#6

You could just send the email through the mail protocol. If it's just going to your own email address, and if Godaddy doesn't require SMTP to send mail, then the mail protocol is easier.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB