FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Specifying from addrress in PHP?





ChrisCh
Hey there. I'm just wondering if it's possible to specify the from address for a form emailer that I've got setup. At the moment, it's pretty much like this:

Code:
$to = $email_address;
$subject = $the_subject;
$msg .= "bla bla bla...";

mail($to, $subject, $msg);


When the recipient receives the message, the email that appears is sent from the master email account for my subdomain. (chrisch@...)
mathiaus
Indeed you can, in fact you're supposed to!
Code:
$to = $email_address;
$subject = $the_subject;
$msg .= "bla bla bla...";
$headers = "From: me@mail.com \r\n";

mail($to, $subject, $msg, $headers);



The mail() function
Diablosblizz
Or, you could always just make them add it in?
Related topics
http://tuvanonline.com/library/index.php
PHP-Nuke platium?
PHP Write to line
Anyone good with PHP-NUKE?
PHP safety?
req: PHP to list files in directory, and link to them
php admin and mysql admin console
Mysql And PHP HELP PLZ
Great php editor
Script php about gallery
File upload with PHP, Build an upload database for your site
[php scripts ] phpweather&email
mySQL Query/PHP code - get the highest value...
Index.php not found
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.