Forum Moderators: coopster

Message Too Old, No Replies

Problem with mail function

         

compose

8:32 pm on Aug 1, 2006 (gmt 0)

10+ Year Member



Hello,

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

dreamcatcher

8:50 pm on Aug 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi compose,

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

GrapefruiTgirl

11:53 pm on Aug 1, 2006 (gmt 0)

10+ Year Member



Hello Compose!
Welcome to the "I'm not getting my mail" club ..

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

compose

1:43 am on Aug 2, 2006 (gmt 0)

10+ Year Member



Hello Dreamcatcher,

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

compose

2:20 am on Aug 2, 2006 (gmt 0)

10+ Year Member



i forget to tell one thing that server is not under my control, this is my client's server so how can i get confirmed that this is probelm of his server.

GrapefruiTgirl

2:23 am on Aug 2, 2006 (gmt 0)

10+ Year Member



[webmasterworld.com ]

Here's what got my problem fixed finally, at least for the time being until I learn about this SMTP AUTH thingy.

Sasha!
GrapefruiTgirl..

compose

2:57 am on Aug 2, 2006 (gmt 0)

10+ Year Member



is this problem of windows server settings?

dreamcatcher

6:45 am on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you try using a domain e-mail address?

dc

GrapefruiTgirl

9:19 am on Aug 2, 2006 (gmt 0)

10+ Year Member



No it doesn't seem to be anything to do with Windows server settings, though if they're wrong you're still at square one.
The problem is with the SMTP server, whomevers it is. One of two things in my case:
1 - the SMTP just will NOT process @hotmail.com emails, or
2 - the SMTP simply won't process emails from outside of its own domain, E.g. - server SMTP.somethingweird.com might only process mail from a user@somethingweird.com email sender.

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

compose

11:09 am on Aug 2, 2006 (gmt 0)

10+ Year Member



Hi,

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

GrapefruiTgirl

2:37 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



Hmmm well I cannot provide much more in the way of suggestions as I am still very new to all this.
Sure sounds like some setting in the SMTP server has changed, or in the script engine.ini file has changed, or possibly in your Host Server's configuration (mail settings perhaps).
But sorry I can't help more. Very pesky when a thing works one day and not the next.
I'm sure someone else more knowledgable will pop in with some more ideas. :)

Sasha

dreamcatcher

3:10 pm on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try setting your error reporting to E_ALL to see if that throws out anything:

error_reporting(E_ALL);

dc

compose

5:11 pm on Aug 2, 2006 (gmt 0)

10+ Year Member



Hello DC,

I tried this too, but it is not throwing any error :( . Is it means taht soem settings on mail server is changed.

if this then can you please tell me how to confirm that sever settings are normal configured.

Vineet