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";
$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

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8
Because

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

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