smartcard Posted April 28, 2007 Share Posted April 28, 2007 Following is the function in my PHP script to send the emails. My current PHP version is 4.4.6 when ever I tried to send a email I am getting the "Error: it was not possible to send e-mail message" Please help.... Function SendMail($to,$subject,&$body,&$headers) { $return_path=""; if(IsSet($this->delivery["Headers"])) { $headers_values=$this->delivery["Headers"]; for($header=0,Reset($headers_values);$header<count($headers_values);$header++,Next($headers_values)) { if(strtolower(Key($headers_values))=="return-path") { $return_path=$headers_values[Key($headers_values)]; break; } } if(strlen($return_path)) { if(!defined("PHP_OS")) return($this->OutputError("it is not possible to set the Return-Path header with your PHP version")); if(!strcmp(substr(PHP_OS,0,3),"WIN")) return($this->OutputError("it is not possible to set the Return-Path header directly from a PHP script on Windows")); if($this->GetPHPVersion()<4000005) return($this->OutputError("it is not possible to set the Return-Path header in PHP version older than 4.0.5")); } } $success=(strlen($return_path) ? mail($to,$subject,$body,$headers,"-f".$return_path) : mail($to,$subject,$body,$headers)); return($success ? "" : $this->OutputError("it was not possible to send e-mail message")); } Link to comment https://forums.phpfreaks.com/topic/49092-script-stopped-sending-emails-please-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.