emails not received

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

emails not received

Post 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
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Re: emails not received

Post by m2babaey »

my question here is how to set mail server in php code :(
Post Reply