By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,858 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

Send mail function

P: 63
Assume we have a form and users fill into the form with some information but the information will not be stored in database. It will be sent directly to an email address instead. So how can we use PHP to do this?
Dec 13 '07 #1
Share this Question
Share on Google+
1 Reply


Markus
Expert 5K+
P: 6,050
Googling never hurts ;)
[php]
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
[/php]
Dec 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.