[php] Почта, Как это дело правильно заквотить

laki

В тело письма вставляется
$_SERVER['SERVER_NAME'] . "forgot/?" . "act=changeform&sid=" . $sid
А приходит:
http://localhost/forgot/?acthangeform&sid.da5b7dc95cc895a702135236285cd9
Как это дело правильно заквотить, чтобы переслать?
Пишется на PHP.


$this->mail_headers = "From: " . ($this->sender_name != '' ?
"\"" . $this->sender_name . "\"" : "") ."<" . $this->from . ">\n";
$this->mail_headers .= "Return-Path: ".$this->from."\n";
$this->mail_headers .= "X-Priority: 3\n";
$this->mail_headers .= "X-Mailer: localhost Mailer\n";
$this->mail_headers .= "MIME-Version: 1.0\n";
$this->mail_headers .= "Content-Type: multipart/mixed;\n\tboundary=\"" . $this->boundry . "\"\n\nThis is a MIME encoded message.\n\n--".$this->boundry;
$this->mail_headers .= "\nContent-Type: text/html;\n\tcharset=\"us-ascii\"\nContent-Transfer-Encoding: quoted-printable\n\n" . $this->message."\n\n--" . $this->boundry;
$this->mail_headers .= "--\n";
$this->message = "";
//prepare start
$this->to = preg_replace( "/[ \t]+/" , "" , $this->to );
$this->from = preg_replace( "/[ \t]+/" , "" , $this->from );
$this->to = preg_replace( "//" , "," , $this->to );
$this->from = preg_replace( "//" , "," , $this->from );
$this->to = preg_replace( "#\#\[\]'\"\(\):;/\$!Ј%\^&\*\{\}#" , "", $this->to );
$this->from = preg_replace( "#\#\[\]'\"\(\):;/\$!Ј%\^&\*\{\}#" , "", $this->from);
//prepare end
if ( !@mail( $this->to, $this->subject, $this->message, $this->mail_headers {
//error
}

bansek

Мб тебе поможет urlencode

laki

Не я пробовал, не фига не помогает.
Оставить комментарий
Имя или ник:
Комментарий: