Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SMTP Error(220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.) [closed]

I am current using CodeIgniter 2.2.2 and I have the following code inside my controller:

        $config['protocol'] = "smtp";
        $config['smtp_host'] = "mail.domain.com";
        $config['smtp_port'] = "25";
        $config['smtp_user'] = "[email protected]"; 
        $config['smtp_pass'] = "password";
        $config['charset'] = "utf-8";
        $config['mailtype'] = "html";
        $config['newline'] = "\r\n";
        $config['wordwrap'] = TRUE;
        $this->load->library('email');
        $this->email->initialize($config);

        $this->email->set_mailtype('html');
        $this->email->from('[email protected]', 'www.somedomain.com');
        $this->email->to('someEmail');


        $this->email->subject('Email Authentication');
        $message = 'Hi';

        $this->email->message($message);

        $this->email->send();

I tried using port 465, and ssl://xxxxxxx.prod.iad2.secureserver.net. But i am getting no luck at all. I tried contacting the customer service, but nope. They really didn't help me much other than giving me links into things I already knew. Why am I getting the message? It is preventing me to send email to my other email addresses. Can anyone please help here?

like image 630
Ryan Fung Avatar asked Jun 15 '15 18:06

Ryan Fung


1 Answers

I'm having the same problem. After some research I found that the solution for me was:

 $config['protocol'] = "mail";
 $config['smtp_port'] = 587;
like image 172
Limon Avatar answered Sep 28 '22 00:09

Limon