Forum Moderators: coopster
I am developing a application that takes data from user for signup and after signp send him a notification mail, i am using ms-access as backend and server os is Windows.
Now, after signup when i write code for mail notificaton, here i checked weather mail is sent or not using this
if(mail($userMail,$subject,$message,$headers))
{
echo "Notification Sent";
}
else
{
echo "Some error";
}
Now each time i run script it shows message "Notification Sent", but actually i am not reciving any mail from this script, i checked $userMail veriable to see it contain valid email address or value, but it is also contain valid value.
please can any body tell me whats the problem here.
Vineet
Having the mail function in an if statement does not determine if the mail has been sent or not, it simply checks that the mail function has executed ok. I would start by checking your variables. Also, check the system using a domain address. It may be that your host has stopped the mail function sending to addresses outside of the domain. Lots of hosts are doing this nowadays because of spam.
If this is the case, you might need to use SMTP authentication.
dc
In this forum a few threads down from this thread you can see where I am at with this same problem you are having. To send my form data I use the same type of script as you are from what I can see, and currently have 2 scripts which claim to be working fine, I get the "Success" message from both.
However I am not getting the mail in my inbox.
Please keep us informed if you get a solution, particularly as DC mentioned, the SMTP AUTH. I will do the same. I bet the answer is in here somewhere :)
Good luck
Sasha
if my mail functionis executing it means that my script is error free, and you told to examine all variables i did so, i checked all variables value
$userMail,$subject,$message,$headers all contain valid value but still not working, is this problem of server.
Can you tell me how to do it using SMTP auth.
vineet
Here's what got my problem fixed finally, at least for the time being until I learn about this SMTP AUTH thingy.
Sasha!
GrapefruiTgirl..
In my case it seems more the #1 situation.
By the way I am using Apache on Windows and have no problems with it.. Yet.
Sasha
My script was sending mail before few days on same server when i was testing it, but from yesterday it stop sending mail , don't konw what's problem.
Is there problem in my code?
- but i checked my script many time all variables are ok , and script is also not throwing any error. And in final i restored my old script(that was sending mail prev.) but it also not did any thing.
Is this problem due to any chaneg in server setting?
- sever is not under my control so i don't know is there anmy changes done on server.
please help in debugging it.
vineet
Sasha