Email Script does not reach destination
Posted on
16th Feb 2014 07:03 pm by
admin
Hey Guys look at this code snippet :
Code:
//read a line from the file
Did you know?Explore Trending and Topic pages for more stories like this.
$myFile = "MailFile.txt";
$fh = fopen($myFile, 'r');
$theData = fgets($fh);
fclose($fh);
echo $theData;
/send Email
$to = "'$theData'";
$subject = "AvailPay new customer Transaction Receipt";
//$message = "Welcome to AvailPay© .rnPlease keep this for your recordsrnBelow is your transaction information:rn";
$message = "welcome";
if (mail($to, $subject, $message)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
I'm reading a file and then using that line as the email address.
I get the "Message successfully sent!" reply - but for some reason the email never arrived at the gmail destination, I also tried it with a yahoo email - same result.
The hosting service said the following:
If you use the mail() function in your PHP, you do not need to specify an outgoing mail server. If you are using some other method besides mail() in your PHP code, use relay-hosting.secureserver.net for your relay server.
I'm using the mail() function, but for some reason the email is not getting to the destination. How would I use the relay-hosting.secureserver.net in PHP??? Or am I missing something. Thanks in advance.
No comments posted yet
Your Answer:
Login to answer
241
23
Other forums
Code clarification
Hi
In the following code what could be the "search_print()" and where it could be
printing links
Hi every1
i am connecting to a table in sql and the looping through with a while ($ var = my
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to
Syntax error
hi im having a little trobble with this script
-------------------------------------------------
How do I know when getBounds Method is ready to be called.
I have an application that changes out stylesheets client side. Once I change stylesheet the browse
Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:
Hi All,
I am trying to connect to the database server from the client server using ruby and f
How to add functionality to a simple php calender?
Hello everyone,
I have just finished creating a simple php calander. Can someone point
Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice
Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,
Blogging s/w
heya frndz!!! i want to start a blog.... m looking for a s/w like oscommerce which is thr for e-comm