Re: HELP with mail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/6/07, Zhimmy Kanata <kanata_zhimmagish@xxxxxxxx> 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("myemail@xxxxxxxxxx", "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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux