Ok guys, I am trying to make a function to send people a quick message to their email. Here is the code:
if ($submitemail=="Send")
{
$from = "$form_fromemail";
$to = "$form_toemail";
mail($to, $form_subject, $form_message, $from);
}
Pretty simple. Say I am trying to send email through the form from (myself) at nmcglennon@mail.utexas.edu.
Now here is the wierd part. When the form is processed it seems to change everything. When the message is recieved, the "From:" line reads "www@host.websitesource.com" (my server) instead of the "nmcglennon@mail.utexas.edu" it is supposed to be. AND the $from variable is appended before the message to the message reads:
"nmcglennon@mail.utexas.edu
Lorem ipsum dolor"
instead of :
"Lorem ipsum dolor".
I have never come across anything quite like this before. Is there something I am doing wrong? or is there a way around this?
Thanks in advance...