View Single Post
  #2 (permalink)  
Old June 7th, 2007, 07:29 AM
astarsi astarsi is offline
Registered User
 
Join Date: Jun 2007
Location: , , Slovenia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to astarsi
Default

I don't know if I really understand what would you like to do...I send the mail from an html page (using a form-redirecting on the php page) and the result(sent or failed) was displayed on a php page

<?

   $toaddress="someone@yahoo.com";
   $subject = "Feedback from web site";
   $mailcontent = "test";
   $from = "sth@gmail.com";

mail($toaddress, $subject, $mailcontent, $from);
?>
<html>
<header>
<title>test</title>
</header>
<body>
<?
    $mailsent = @mail($toaddress, $subject, $mailcontent, $from);
echo $mailsent ? "Mail sent" : "Mail failed";
?>

</body>
</html>

I hope this will help :)


Reply With Quote