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
IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with
Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t
Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does
How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :
<form id="f
Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/
PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f
php code to accept and delete incoming data
Using following HTML Code please show me how to write PHP code to accept and delete the incoming dat
How can I Compare two xml documents?
Hi all,
I am doing a POC for my project and I am using XE database 10g version.
Multiple upload and Resize
I would like some help on my script I have the for my index.php
////
<html&
How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write