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
Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?
$playern
get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i
send message to the java application
Oracle 10g with Windows platform.
I have a java application that periodically pings the d
BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i
writing my own sobel filter convolution - something is wrong
I am trying to keep it very simple, I cant see anything wrong with my logic, could anybody help poin
Login logout link help
Hi all,
Im new to php and Im having trouble creating a login/logout link for my page that dis
Where am I going wrong
Been trying to work this out for hours
I have two tables called 'Genres' and 'Films'. Genre
Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is
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. <
Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co