note 2027 modified in mail by ronabop

From: Date: Mon, 02 Oct 2000 10:03:06 +0000
Subject: note 2027 modified in mail by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-5851@lists.php.net to get a copy of this message
To have names appear in the To: and From: lines of mail clients such as Outlook, Outlook Express etc I've used the following which worked quite well: $to = "$toname <$toemail>"; $from = "$fromname <$fromemail>"; $subject = "Your Subject"; mail($to, "$subject", $message, "From: $from\n"); The $toname, $toemail, $fromname, $fromemail don't actually have to be variables, but since you'll probably use variables there (defined elsewhere in your scripts), I put them in. HTH http://www.php.net/manual/function.mail.php

« previous php.notes (#5851) next »