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
Estimations and Effort
HI Gurus,
Would like to know whether SAP have a provision for carrying out the Project es
WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.
HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from
server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase
PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26
IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.
uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f
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
upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as
How to validate from 2 possible answers
Hi
I hope somebody can help me with what will probably be really simple, I'm pulling my hair