On 4/6/07, Zhimmy Kanata <[EMAIL PROTECTED]> 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,
    "From: \r\n"
   ."Reply-To: \r\n"
   ."X-Mailer: PHP/" . phpversion());
 }
?>
<snip>

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("[EMAIL PROTECTED]", "Registration Confirmation", $mailBody,
   "From: \r\n"
  ."Reply-To: \r\n"
  ."X-Mailer: PHP/" . phpversion());
}
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to