OK, here's the deal. I setup a mailing list for my site.
http://www.brianellisrules.com/mailinglist/
I found the script online and it's simple and it works. Although if anyone has any suggestions for improvements, I'm all ears.
I tried adding in a feature where it would send me a notification email whenever someone signed up or left the list. Here's a snippet:
$fname, $lname and $email are input via the form on the page and that works.
It sends the email and all the variables are working. However, the $from portion is listed as part of the message, rather than going in the "From: " header... so when I get the email, it says "From: nobody@(my server)". (it's supposed to be "From: the person's email address", but instead their email address is listed in the body.)
What am I doing wrong and how do I get the $from variable to show up in the "From:" header of the email?
Thanks,
Brian
http://www.brianellisrules.com/mailinglist/
I found the script online and it's simple and it works. Although if anyone has any suggestions for improvements, I'm all ears.
I tried adding in a feature where it would send me a notification email whenever someone signed up or left the list. Here's a snippet:
PHP:
$myemail="(my email address)";
$subject="new mailing list subscription!";
$message="$fname $lname ($email) has joined the mailing list!";
$from=$email;
mail($myemail, $subject, $message, $from);
$fname, $lname and $email are input via the form on the page and that works.
It sends the email and all the variables are working. However, the $from portion is listed as part of the message, rather than going in the "From: " header... so when I get the email, it says "From: nobody@(my server)". (it's supposed to be "From: the person's email address", but instead their email address is listed in the body.)
What am I doing wrong and how do I get the $from variable to show up in the "From:" header of the email?
Thanks,
Brian