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
Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <
Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.
When we try to pass an array from VB6.0 to an Oracle PL/SQL
whats wrong with my code please help!!!
this is the error
Warning: mysql_close(): supplied argument is not a valid MySQL-Link res
registration form
first time posting. did some searches but didnt find exactly what i am looking for. dont flame cause
Parse error: syntax error, unexpected $end in
hello,
i receive the error :Parse error: syntax error, unexpected $end in C:xamppxampphtdocsh
Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.
Can I use a loop
Hi buddies!
Once again with my doubts here.
Right now I am using this sql stat
Run function every 5 mins ??
I have a function PostMessage()
How can I run it every 5 mins ??
Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What
Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i