Re: headers not allow to send the mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove these 
$headers = "Date: ".$this->RFCDate().CRLF;
	$headers .= "Return-Path: ".$from.CRLF;
and kee $headers = "";

and you need to do the changes. Don't overhead the header rather than using standard. so you can send the mail.

Prabhakar 



--- In php-objects@xxxxxxxxxxxxxxx, "amit" <paragchaure@...> wrote:
>
> Hi all,
> 
> I have create a script of form processor which is working properly in some servers but now it does not allow to send the mail form the server.
> If I removes the headers the mail is send 
> 
> here is the code 
> 
> $unique_id=md5(uniqid(rand()));
> 		$this->boundary='-----='.$unique_id;
> 		$from=($type==1)?((km_str_casecmp("[|re_Email|]",$this->arrkm['FROM']))?$_POST['re_Email']:$this->arrkm['FROM']):$this->arrkm['AUTOFROM'];
> 		$headers="Date: ".$this->RFCDate().CRLF;
> 		$headers.="Return-Path: ".$from.CRLF;
> 		$to=($type==1)?$this->arrkm['TO']:((km_str_casecmp("[|re_Email|]",$this->arrkm['FROM']))?$_POST['re_Email']:$this->arrkm['FROM']);
> 		$headers.="To: ".$to.CRLF;
> 		$headers.="From: ".$from.CRLF;
> 		$replyto=($type==1)?$from:$this->arrkm['AUTOFROM'];
> 		$headers.="Reply-to: ".$replyto.CRLF;
> 		if($type==1 && !empty($this->arrkm['CC'])){
> 			$headers.="Cc: ".$this->arrkm['CC'].CRLF;
> 		}
> 		if($type==1 && !empty($this->arrkm['BCC'])){
> 			$headers.="Bcc: ".$this->arrkm['BCC'].CRLF;
> 		}
> 		$subject=($type==1)?$this->arrkm['DATAEMAILSUBJECT']:$this->arrkm['AUTOSUBJECT'];
> 		$subject=str_replace("\r\n"," ",$subject);
> 		$subject=str_replace("\r"," ",$subject);
> 		$subject=str_replace("\n"," ",$subject);
> 		$subject=$this->replaceTags($subject);
> 		$headers.="Subject: ".$subject.CRLF;
> 		$headers.=sprintf("Message-ID: <%s@%s>%s",$unique_id,$this->getServerHostName(),CRLF);
> 		$headers.="X-Priority: 3".CRLF;
> 		$headers.="X-Mailer: Kmita Mail (kmitascripts.com) [Version 4]".CRLF;
> 		$headers.="Disposition-Notification-To: ".$from.CRLF;
> 		$headers.="MIME-Version: 1.0".CRLF;
> 		if(($type==1 && $this->dataemattachment) || ($type==2 && !empty($this->arrkm['AUTOATTACHMENT']) && is_file(stripslashes($this->arrkm['AUTOATTACHMENT'])))){
> 			$contenttype=2;
> 		}else{
> 			$contenttype=($type==1)?$this->arrkm['DATAEMAILFORMAT']:$this->arrkm['AUTOFORMAT'];
> 		}
> 		$headers.=$this->getMailMime($contenttype,CRLF);
> 		$this->from=$from;
> 		$this->to=$to;
> 		$this->subject=$subject;
> 		$this->headers=$headers;
> 
> is any problems in creating header for mail?
> 
> Please help me 
> Thank you in advance
>



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux