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
adding up might be solved tell us cheers.
i think i finally solved this anybody.
last time i was getting the wrong results.
Code
noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.
how to populate a drop down box
Hi buddies!
PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar)
is
begin
DOWNLO
Placing and array within an array then sorting it!
I have a page that runs two large mysql queries and saves the results into arrays, in php I then per
Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl
Material Issuing for receiving batch
Dear All experts in MM/ PP,
Material issuing from main stores to factory is currently usi
A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran
How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w
Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter
Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.
I wrote this code for a PHP calendar as an