jimfog Posted July 14, 2015 Share Posted July 14, 2015 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 More sharing options...
justsomeguy Posted July 14, 2015 Share Posted July 14, 2015 Any type of connection to another server can create a bottleneck, including mail servers. Link to comment Share on other sites More sharing options...
jimfog Posted July 14, 2015 Author Share Posted July 14, 2015 the application is built locally... as such...there is not any mail server. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 14, 2015 Share Posted July 14, 2015 Yes, there is. If you're not using a mail server to send email, what exactly are you using? What do you think the mail function does? Link to comment Share on other sites More sharing options...
jimfog Posted July 14, 2015 Author Share Posted July 14, 2015 are you referring to sendmail? Link to comment Share on other sites More sharing options...
justsomeguy Posted July 14, 2015 Share Posted July 14, 2015 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 More sharing options...
jimfog Posted July 14, 2015 Author Share Posted July 14, 2015 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 More sharing options...
justsomeguy Posted July 14, 2015 Share Posted July 14, 2015 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 More sharing options...
jimfog Posted July 15, 2015 Author Share Posted July 15, 2015 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 More sharing options...
justsomeguy Posted July 15, 2015 Share Posted July 15, 2015 Sendmail is what you're looking for. Link to comment Share on other sites More sharing options...
jimfog Posted July 15, 2015 Author Share Posted July 15, 2015 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 More sharing options...
justsomeguy Posted July 15, 2015 Share Posted July 15, 2015 They can, sure. They might not, also. Production hardware is typically more powerful. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 15, 2015 Share Posted July 15, 2015 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 More sharing options...
jimfog Posted July 16, 2015 Author Share Posted July 16, 2015 I suppose you mean 20sec...20min is just unacceptable. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 16, 2015 Share Posted July 16, 2015 Depends if they have set minimum time before bulk limited number of emails are sent each time. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now