Jump to content

Cant send email.. help !!


alvinchua

Recommended Posts

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 = "[email protected]";

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..

Link to comment
https://forums.phpfreaks.com/topic/100842-cant-send-email-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.