Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email error


PappaSmurf

Recommended Posts

Posted

Hello,

thanks for taking the time to help me with this. when i try and send an email from my OScommerce site it comes up with the following errors;

 

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\inetpub\wwwroot\os-commerce\catalog\includes\classes\email.php on line 502

 

Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\os-commerce\catalog\includes\classes\email.php:502) in c:\inetpub\wwwroot\os-commerce\catalog\includes\functions\general.php on line 29

 

and these are the lines it is refering to;

 

if (EMAIL_TRANSPORT == 'smtp') {ini_set(SMTP, "smtp.mail.yahoo.com");

return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

} else {

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

}

 

 

please advise on what i should do, i am pritty sure that my SMTP is right but i dont know why it doesnt send the emails.

thanks for your time

Andy

Posted

See if this helps:

if (EMAIL_TRANSPORT == 'smtp') {ini_set(SMTP, "smtp.yahoo.com");
return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
} else {
return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));
}

Posted

ok i have my emails working now :D so to get them running do this;

open your mail program..for me it was outlook express..tools..accounts..properties..servers...find the name of your smtp server..outgoing mail (SMTP)______...mine is smtp.mail.yahoo.com

 

in /includes/classes/email.php go to line 500 and you will find this

 

if (EMAIL_TRANSPORT == 'smtp') {

return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

} else {

 

Add

 

ini_set(SMTP, "smtp.mail.yahoo.com");

 

 

so that it looks like

 

if (EMAIL_TRANSPORT == 'smtp') {

ini_set(SMTP, "smtp.mail.yahoo.com");

return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

} else {

 

 

 

hope that helps :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...