RE: [PHP-DB] Mail Function

From: Date: Wed, 28 Aug 2002 02:55:09 +0000
Subject: RE: [PHP-DB] Mail Function
Groups: php.db 
Request: Send a blank email to php-db+get-21413@lists.php.net to get a copy of this message
Oops! wrong order of arguments... I meant: $mailTo = "me@mydomain.com"; $mailFrom = "From:from@mydomain.com"; $mailSubject = "This is an email..."; $mailBody = "This is a message"; @mail($mailTo,$mailSubject,$mailBody,$mailFrom); Russ -----Original Message----- From: Manoj Japher [mailto:manojjapher@rediffmail.com] Sent: Wednesday, August 28, 2002 2:33 AM To: php-db@lists.php.net Subject: [PHP-DB] Mail Function hi, I know this question is in the wrong group, but I hope someone maybe able to help me out. I need to use the mail() function in my code to send out mails which I am able to do successfully. But I am not able to set the 'from address' in the mail I sent. It always varies. Can I set the from address field as to my liking. I tried the following code <? $toaddress = "manojjapher@rediffmail.com"; $fromaddress = "manojjapher@hotmail.com"; $subject = "Test Mail"; $content = "Your username and password as you requested \n" ."Username = user \n" ."Password = pass \n"; mail($toaddress, $subject ,$content, $fromaddress); echo " Your username and password has been mailed to you "; ?> And the mail I got had the from address as apache@localhost.localdomain. Can someone help me out please Best Regards, Manoj 'I have miles to go before I sleep, and promises to keep' -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#21413) next »