I have this newsletter graphic on my page and it just asks for the person's name and email to subscribe to my newsletter. However, it doesn't send me the persons name and email. It send me a blank email. I blanked out the email portion below for security reasons. See my php script: <? $subject="from ".$_GET['your_name']; $headers= "From: ".$_GET['your_email']."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("blanked_out@nowhere.com", $subject, " <html> <head> <title>Contact letter</title> </head> <body> <br> ".$_GET['message']." </body> </html>" , $headers); echo ("Your message was successfully sent!"); ?> Any help would be appreciated.
Never ever use GET for strings longer than 150 chars !! Check if you've added GET method to your form, check if your message was passed in the correct way ( with simple echo or print function ).
Try sending a mail without html tags, just plain texts and see what you get. I think you cant send HTML mails using mail()? or I am wrong here. Anyway, just give it a try.
Can someone please post a simple php script that will send me the persons name and email address? I would greatly appreciate it.
you could not use $_GET['message'] in a string. Assaign it to a variable and then use it in your email body. Thanks, vijay