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
Update Myspace status with CURL
Logging in:
Code: <?php
class Myspace
{
function login($username, $pa
Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:
php form help
Hey,
I use a control file to set my meta tags and titles
Here's an example
Code: &a
help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page.
What is ha
Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba
Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.
I have a multidimensional array f
PHP login form help (Done Most of It)
Hi i am having a problem, when i try logging in it is always saying "Invalid Login" im not
regex for quoted text within a string
I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape q
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),
a u
problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm