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
$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
At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or material
selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c
Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then
database design
Hi,
I got a page which allow candidate to type in their previous working experience,
I let
LSB (PHP 5.3) problem with static value!
hello,
i'm having a problem. static::$text variable gets lost at some point. can someone plea
Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil
"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql
Image DPI
Hi.
I allow users to upload images, the user then is able to adjust several settings for the
Quick variable question
hey guys/gals,
im trying to write a php script and it works fine as i have it, but i need to set
how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel