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
Sort Alternative/bi-monthly
Hi all,
Am going mad trying to get something to work.
I'm creating a CMS for a magazi
script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of
Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted t
Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I
db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------
Accept only alpha characters
I've got this bit of code ready for accepting a phrase:
Code: if (!eregi ("", $_POS
str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa
HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane.
Big O & time complexity ???
can you help me how to calculate the Big O & time complexity for any algorithm and c++ program pleas
Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<