alvinchua Posted April 12, 2008 Share Posted April 12, 2008 hi ppl .. i wish to send email through php.. if can .. i wan to send emails to hotmail and yahoo mailbox ... i have a web hosting service that host php file (means that i have host the file on it and not localhost) .. and they provide me the email feature too where i tried to send to those email also.. but all the mails i sent to (either hotmail or yahoo or provided emails) do not appear in thier inboxes .. pls help .. and here my code.. <?php $errorMessage = ''; if (isset($_POST['name']) && isset($_POST['email']) &&isset($_POST['message'])) { $name = $_POST['name']; $email =$_POST['email']; $message = $_POST['message']; $to = "alan@domain.com"; mail($to, "Customer Enquiry", "Name: $name \n\n Enquiry: \n\n $message", "From: $email"); echo("<p>Message successfully sent!</p>"); echo $name; echo $email; echo $message; echo $to; } else { echo("<p>Message delivery failed...</p>"); } ?> Thank in advance.. Quote Link to comment Share on other sites More sharing options...
poleposters Posted April 12, 2008 Share Posted April 12, 2008 according to your script all your emails are being sent to alan@domain.com Check this link. It will teach you everything you need. http://www.sitepoint.com/article/advanced-email-php/ I hope you're not planning to spam Quote Link to comment Share on other sites More sharing options...
alvinchua Posted April 13, 2008 Author Share Posted April 13, 2008 hmm i have check out the website and i found out that it do not show me what i need .. i just want to send simple mail to any email like hotmail, yahoo, gmail or email services that provided by the hosting website ... Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.