mail() says sent but no email received


Posted on 16th Feb 2014 07:03 pm by admin

My code is quite simple:

Code: <?php
$to = "Ty44ler@yahoo.com";
Did you know?Explore Trending and Topic pages for more stories like this.
$subject = "Test mail";
$message = "Hey, I just wanted to see if the script worked.";
$from = "Ty44ler@yahoo.com";
$headers = "From: $from";

if (mail($to,$subject,$message,$headers)) {
echo("<p>Message successfully sent!</p>");
}
else {
echo("<p>Message delivery failed</p>");
}
?>
I have the SMTP server correct in the php.ini file as well as the port as it connects fine when I do a telnet. Also checked the spam folder and nothing there...
No comments posted yet

Your Answer:

Login to answer
50 Like 5 Dislike
Previous forums Next forums
Other forums

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash