Re: HELP with mail()
| From: | Tijnema ! | Date: | Fri, 06 Apr 2007 07:23:03 +0000 |
| Subject: | Re: HELP with mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252137@lists.php.net to get a copy of this message | ||
On 4/6/07, Zhimmy Kanata <kanata_zhimmagish@yahoo.ca> wrote:
I created the following email program from a email function that I know works in another program. When I create a simple form page listed below and submit it. It echos the $email and the $username and it writes it to the page. So it is finding the variables within the transfering url in the form of a post. It doesn't give me an error message but I don't get an email? Should the Linux server not be executing the mail() function? What the beep!??????? Again thanks in advance for any help. Zhimmy <?php $email = strtolower($email); echo "$email, $username"; function sendEmail($email, $username) { $mailTo = "$username <$email>"; $mailSubject = "Your registration confirmation..."; $mailBody = "Dear $name,\n\nYour details have been added to my email list.\n\n To unsubscribe click on the link below\nhttp://www.sitename.com/mail.php?action=unsubscribe&email=$email"; mail($email, "Registration Confirmation", $mailBody,Try hardcoding the email, i've seen this problem more on this list.Try the code below and see if it solves your problem. Tijnema <?php $email = strtolower($email); echo "$email, $username"; function sendEmail($email, $username) { $mailTo = "$username <$email>"; $mailSubject = "Your registration confirmation..."; $mailBody = "Dear $name,\n\nYour details have been added to my email list.\n\n To unsubscribe click on the link below\nhttp://www.sitename.com/mail.php?action=unsubscribe&email=$email"; mail("myemail@domain.com", "Registration Confirmation", $mailBody, "From: \r\n" ."Reply-To: \r\n" ."X-Mailer: PHP/" . phpversion()); } ?>"From: \r\n"."Reply-To: \r\n" ."X-Mailer: PHP/" . phpversion()); } ?> <snip>