Page 1 of 1

emails not received

Posted: Fri Dec 17, 2010 7:14 am
by m2babaey
Hi
I use a simple code to send email by PHP like:

Code: Select all

<?php
$email="myemail@yahoo.com";
$subject="test email";
$message="test message";
$sent=mail($email,$subject,$message);
if($sent) echo "Mail sent";
else echo "Mail was not sent";
?>
I used this code on my host and it was working. But from 2 days ago, emails are not received to the inbox
I contacted my host and they told me to make sure about this rule:
you must change the mail server from "mail.your_domain.name" to "scriptmail.intermedia.net"
But I don't know what I should do about this

Re: emails not received

Posted: Fri Dec 17, 2010 10:30 am
by m2babaey
my question here is how to set mail server in php code :(