I know this question is in the wrong group, but I hope someone 
able to help me out. I need to use the mail() function in my code 
send out mails which I am able to do successfully. But I am not 
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 = "[EMAIL PROTECTED]";
         $fromaddress = "[EMAIL PROTECTED]";
         $subject = "Test Mail";
         $content = "Your username and password as you requested 
                    ."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

Can someone help me out please

Best Regards,


'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

Reply via email to