Reply to need help sending email from php

Your name:

Reply:


Posted by Dave Calhoun on 06/17/05 02:41

I'm trying to send email from a php script (not my code) and the mail is
being rejected by my isp's qmail server. It says that I have illegal
crcr's where I should have crlf's. I'm not sure what to do. Here is the
code if it gives any clues. Also, if someone could enlighten me on how
those $this-> lines work I'd appreciate it.

Thanks for any help.
Dave



function send() {
global $language;
if (empty($this->to) || empty($this->from)) {
return false;
}
if (isset($_SESSION["tp"]->email_prefix) &&
!empty($_SESSION["tp"]->email_prefix)) {
$this->subject = '['.$_SESSION["tp"]->email_prefix.']
'.$this->subject;
}
$cc = "";
if (!empty($this->cc)) {
$cc = "Cc: ".$this->cc."\n";
}
$bcc = "";
if (!empty($this->bcc)) {
$bcc = "Bcc: ".$this->bcc."\n";
}
if (empty($this->reply_to)) {
$this->reply_to = $this->from;
$this->reply_to_name = $this->from_name;
}
if (empty($this->charset)) {
$this->charset = $language->charset;
}
//$body =~ s/\r\r/\r\f/g, $body;




$sent = mail($this->to
,$this->subject
,$this->body
,'From: "'.$this->from_name.'" <'.$this->from.'>'."\n"
.'Reply-To: "'.$this->reply_to_name.'"
<'.$this->reply_to.'>'."\n"
.'Return-Path: "'.$this->reply_to_name.'"
<'.$this->reply_to.'>'."\n"
.$cc
.$bcc
.'Date: '.date('r')."\n"
.'Content-Type: text/plain;
charset='.$this->charset."\n.\n"
);

if ($sent != false) {
return true;
}
else {
return false;
}
}

}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация