AW: [PHP-WIN] php mail()
| From: | k dot krohn at bit-serv dot de | Date: | Thu, 24 Jan 2002 10:13:22 +0000 |
| Subject: | AW: [PHP-WIN] php mail() | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11618@lists.php.net to get a copy of this message | ||
Hello Fabian!
Try this:
<?
// strings, set by your form
$mail_from ="absender@somewhere.com";
$subject = "Your Subject";
$body = "Some text here";
// receiptient of the mail
$mail_to = "fabian@your-server.com";
// let's rock...
$extra_header = "From: $mail_from\nErrors-To:
admin@your-server.com";
mail($get_email, $subject, $body, $extra_header);
?>
Works fine for me, should work for you, too.
Be carefull with $extra_header. If you forget a blankspace or an \n, it
won't work.
More Infos at:
http://www.php.net/manual/en/function.mail.php
(German: http://www.php.net/manual/de/function.mail.php
)
Karsten
> I have made a php formmailer!
>
> My Problem:
> When I receive the mail, in the from(sender) line is something like
> www-data, but I wont the real sender adress for example
> max@mustermann.de in
> the from line not in the subject line or in the message, just
> in the from
> line!
>
> Fabian Hoffmann