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
CU&UC guide
Hi Gurus,
can anybody provide me the link for CU&UC upgrade guide
Thanks i
Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.
we have to suppl
Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as
Pass sql into pl/sql and create RMAN duplicate script.
Hi,
I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma
INSERT for date range
Hi all
I have the following table
Code: [Select] `date` date
`day` int(2)
`
problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections
Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.
However
how to remove in php string display
My code is
$message="We're looking at developing our website.";
$body= "
Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently