Jump to content

delay caused my mail function


jimfog

Recommended Posts

I have created a function where it sends a verification mail(using PHP's mail function) whenever the user attempts to change his e-mail.

 

I have noticed that if this function is called with sending of the verification mail pending...(made from a previous call)...the execution is delayed considerably...

 

I am not sure that is the cause of the delay-I just wanted to ask-from your experience,if mail() is called without having finished before sending an email,can this create a bottleneck?

Link to comment
Share on other sites

the application is built locally...

as such...there is not any mail server.

Link to comment
Share on other sites

are you referring to sendmail?

Link to comment
Share on other sites

Sendmail is one program that it can use. The point is that PHP sends the message to some sort of system and that the email eventually finds its way to an outgoing mail server. Mail servers are the only things that send or receive email, that is how email works. If you're sending or receiving email then you're using a mail server, it doesn't matter if it's local or not.

Link to comment
Share on other sites

How i can verify the existence of this mail server in my system...is it a file somewhere?I am just curious to find out...thanks

Link to comment
Share on other sites

You would have installed it, mail servers aren't standard software. It's not necessarily a single file, it's a program like any other. If you installed a web development package then look into that to see what mail server they install.

Link to comment
Share on other sites

The only thing that I have installed is Apache....there is not any mail server in it...as far as I can tell.

 

Can you guide me to search somewhere to find the mail server?

 

As far as I can recall I do not remember installing any mail server...only sendmail so that mail() can work.

Are you sure mail() requires a mail server to work locally?

Link to comment
Share on other sites

Ok...I have one last question...currently I am in a local environment...and as you said the mail server might be causing the delay.

 

I am just trying to think what will happen in production environment...cause if locally there might be delays am I right to assume that in production

things can get much worse?

Link to comment
Share on other sites

It should not happen, it should not be delayed no more than 20min, It would only happen if you or your host don't include some spam prevention that the mail server is overrun with so much of this spam that the valid email just gets held up in a queue.

Link to comment
Share on other sites

I suppose you mean 20sec...20min is just unacceptable.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...