HELP with mail()

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

 



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());
  }
?>

   
   
  Form:
   
   <form action='mail1.php' method='POST'> 
      
Username: <br>   
<input type='text' name='username' class='register_box'>      
<br>      
   
Email: <br>      
<input type='text' name='email' class='register_box'>      
<br>      
Password: <br>      
<input type='password' name='password' class='register_box'>                                              
<br>      
<input type='submit' name='register' value='New Registration!' class='register_box'>      
</form> 

 		
---------------------------------
All new Yahoo! Mail  
---------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.

[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