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

Form a inline view based on the results of the previous query?
Hi Experts,
Can we form a inline view on the results of a previous query (another inline view)?

help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page.

What is ha

help with php
It's not displaying or pulling anything out of the database.


Code: <html><

Keeping data in form
How can I keep whatever I write in the form?

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

trim function issues
Hi guys, total noob here...

So I've been tinkering around with a html and am using php to em

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

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