Re: www-data@.... smtp blues



The Natural Philosopher skrev:
Geir wrote:
The Natural Philosopher skrev:

insert after $header ,"-f myname@xxxxxxxxxxxx" as an extra parameter.


So:
return mail($to, iconv_mime_encode(Subject, $subject,
array("input-charset" => "UTF-8","output-charset" => "UTF-8")), $message, $header, "-f myname@xxxxxxxxxxxx");

Hi again,

That worked like a charm :-)

Thanks a bunch :-))

geir
HTH! :-)

Ooops, I found another mail wrapper in another script. How / where do we include your nice -f parameter in the code below?

function mailsend2($to, $subject, $message, $from, $fromname, $reply,
$file, $filename)
{
require_once('class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
$mail->IsSendmail(); // telling the class to use SendMail transport
$mail->SetFrom("$from","$fromname");
$mail->AddAddress("$to");
$mail->Subject = "$subject";
$mail->MsgHTML($message);
$mail->AddAttachment("$file");
if(!$mail->Send()) {
return false;
} else {
return true;
}
}
.


Quantcast