PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$mailto = "***";
$subject = "Thank you for signing up for our conference";
$body = "Hello Chris!";
$from = "Your Name <youremail@yourdomain.com>";
mail($mailto,$subject,$body,$from);
?>
thanx
PS: for some reason i cannot use the search on this site properly when i am at work?
at home it works fine but at work when i seach and click on a link it goes to a blank white page. very weird. it has nothing to do with a fire wall or blocking of sites etc.
Last edited by C_Calav on Mon Mar 27, 2006 4:03 pm, edited 3 times in total.
<?php
$mailto = "***";
$subject = "Thank you for signing up for our conference";
$body = "Hello Chris!";
$headers = "From: C C <***@hotmail.com>";
mail($mailto,$subject,$body,$headers);
?>
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Apache2\htdocs\survey\launch_email.php on line 46
Last edited by C_Calav on Mon Mar 27, 2006 4:04 pm, edited 1 time in total.
It shouldn't really matter if you specify your own headers but give it a go .... just uncomment it. Also if you haven't touched PHP.ini you probably need to set up your smtp settings before mail() will work
Did you try \r\n after the header and removing the name and < >? That should be your php.ini yes but run php_info() to check. You can also see what it's reading as your mail settings too.