can't send email |
can anyone help me to get this issue?i am new and not able to send email.
controller: function mail() { $data['memail']=$this->email_model->m_email(); $data['hemail']=$this->email_model->h_email(); $this->load->library('email'); $config=array( 'protocol'=>'smtp', 'smtp_host'=>'ssl://smtpout,secureserver,net', 'smtp_user'=>'[email protected]', 'smtp_pass'=>'3#A6b24!', 'smtp_port'=>'25', 'validation'=>TRUE, // bool whether to validate email or not 'charset'=>'utf-8', 'wordwrap'=> TRUE, 'mailtype'=>'html' ); $this->email->initialize($config); $this->email->set_newline("\r\n"); $this->email->from('[email protected]','robb forsythe'); $this->email->to('[email protected]'); $this->email->subject('80% FULL CONDITION - LOWES CDT-#3302'); $body=$this->load->view('email/email_form',$data,true); $this->email->message($body); if($this->email->send()) { // mail sent echo 'Your e-mail has been sent!'; } else { //error show_error($this->email->print_debugger()); } $this->load->view('email/email_form'); } error: The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: Name or service not known Unable to send data: AUTH LOGIN Failed to send AUTH LOGIN command. Error: Unable to send data: MAIL FROM: from: The following SMTP error was encountered: Unable to send data: RCPT TO: to: The following SMTP error was encountered: fsockopen(): unable to connect to ssl://smtpout,secureserver,net:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known)
I see all kinds of problems. First, please tell me that's not your real password that you copy/pasted here? ...
Second, your config: Code: $config=array( You have commas in instead of periods. I assume it should be: Code: $config=array( Last thing I noticed, you specify ssl but use port 25 which is typically not encrypted. You probably want to change smtp_port to 465 or whatever the appropriate port is for your SMTP server for SSL. |
Welcome Guest, Not a member yet? Register Sign In |