Problems sending email using mail() function
Posted: Thu Jun 16, 2005 12:39 am
Hi Team,
I am having problems sending email from a website that I have created.
If I send the email to someone at the same domain the website has then it will not send.
If I send the email to anyone at a different domain then it works fine but for some weird reason not when I send to the same domain. I'll give you the code to have a squiz at.
If someone could help me out then I would be much appreciated.
d11wtq | Please use
I am having problems sending email from a website that I have created.
If I send the email to someone at the same domain the website has then it will not send.
If I send the email to anyone at a different domain then it works fine but for some weird reason not when I send to the same domain. I'll give you the code to have a squiz at.
Code: Select all
$message = "TEST";
$from = "Ben";
$subject = "Subject";
$to ="domain@domain.com"; // Lets just pretend that domain.com is the name of the website
// Mail it
$mail_success = mail($to, $subject, $message, $from);
if ($mail_success == true)
{
header("location:contactthanks.php");
exit();
}
else
{
header("location:contacterror.php?error=error+sending+email");
exit();
}d11wtq | Please use
Code: Select all
tags when posting PHP code[/color]