I am so stressed,


My membership signup was working fine. Now it's not emailing. It is entering into the database fine but not emailing can someone tell me what is the problem, Thanks Kindly I'm Exhausted...

To session_id is to the person who just signed up.

// Let's mail the user!
$to = "$session_id";
$subject = "Your Membership at Puddin Patch Date Match!";
$message = "Dear $username,
Thank you for registering at our website, http://www.puddinpatchdatematch.com!

You are two steps away from logging in and accessing our exclusive members area.

To activate your membership,
please click here: http://www.puddinpatchdatematch.com/login_form.php

Once you activate your memebership, you will be able to login
with the following information:
Password: $password
email_address: $email_address
Thanks!

The Webmaster

This is an automated response, please do not reply!";

mail($email_address, $subject, $message,
"From: www.puddinpatchdatematch.com Webmaster<admin@mydomain.com>\n
X-Mailer: PHP/" . phpversion());
echo 'Your membership information has been mailed to your email address!
Please check it and follow the directions!';
}

?>


</body>
</html>

Recommended Answers

All 7 Replies

Put your mail function in an if-then statement. If it returns false it's time to display your variables before you try to call mail so that you know for sure the values that mail is recieving. If it returns true then it probably isn't a PHP issue, but a server issue.

I do not know exactly how to do that... I wish I did! But it was working fine. I am convinced it is my server , you mean the people I host my webpage with. Ohhhh It's so upsetting. I so much want to learn this php and know how to bring it all together... Thanks for your reply

Submit a ticket to your host. If you haven't changed the script then its probably something your host has done.

Yes I will do that thanks,

I just said I going to double check I was not sure about the server that they could be be having a problem I'm actually shocked. No one should be ever touching my files but I wanted to post it and ask, I did not change anything in it and it worked perfect.

Geeee Wiz ... Thanks again!

try doing this:

$headers = "From: www.puddinpatchdatematch.com Webmaster <admin@mydomain.com>\n
X-Mailer: PHP/" . phpversion();
if (mail($email_address, $subject, $message,$headers)) {
     echo 'Your membership information has been mailed to your email address! Please check it and follow the directions!'; 
} else {
     echo 'There was a problem emailing your membership information to you at '.$email_address;
}

if it says that there was a problem then the chances are it was your server
replace the line that contains mail, and replace it with the above

Well the server owners are ALLOWED legally to edit your code. Check your code it is probably slightly different. I saw a few things that needed to be changed so I'm assuming they went in and fixed the code. My server has done the same thing with mine before. Its not uncommon for them to do it. Its quicker than explaining it to you and when they have 500k people using their server they don't really have time to explain it. Them owning the server gives them access rights to EVERYTHING on it. So if your storing things you don't even want them doing. I suggest building your own server.

I contacted them and explained. Thaey did something cause it is working fine so it was something from their end for sure! it's working fine now. Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.