Welcome Guest, Not a member yet? Register   Sign In
Problem in sending mail
#1

[eluser]geshan[/eluser]
The code to send email worked well on a Linux server, it also works well on a Windows XP but on the live server with Windows 2003 I get the following error when sending mail from the mail library.

Code:
Severity: Warning

Message: mail() [function.mail]: SMTP server response: 501 Syntax error,
parameters in command "MAIL FROM:<<[email protected]>>" unrecognized or missing

Filename: libraries/Email.php

Line Number: 1428

The code in 1428 uses -f in the forth parameter, I guess that may be causing the problem.

The following is the code I'm using to send a HTML mail.

Code:
$config['mailtype'] = 'html';
            
            $this->email->initialize($config);
            $this->email->clear();
            $this->email->to($mail_to);
            $this->email->from($mail_from, 'Sender Name');
            $this->email->subject($mail_data['mail_subject']);
            $this->email->message($mail_message);
            if( !$this->email->send() ){
                    //error
             }
            else{
                     //sent
                  }


If anyone has encountered this problem and knows the solution please help.




Theme © iAndrew 2016 - Forum software by © MyBB