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

insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.

<form method="

Pagination
Hi All,

I think I'm finally getting somewhere with pagination!

I can now submit a quer

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

Empty text file when there is over XXXX lines of text.

define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "

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