Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Slow contact form

the mail() function

Moderators: macek, egami, gesf

Slow contact form

Postby Shaggy » Sat Jun 04, 2011 6:47 pm

Hello - I have a simple contact form that works; but after clicking submit, it hangs for several seconds before showing the "thank you" page. Can anyone offer insight? Is it most likely due soley to the mail server, or..?
Shaggy
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Jun 04, 2011 6:22 pm

Re: Slow contact form

Postby Nullsig » Mon Jun 06, 2011 8:00 am

Do you write to the database? Or, do you just send out the mail?

Usually the mail server doesn't really slow down the system as the message is just thrown into a queue to be handled by the server, only checking that the message is actually queued.

If you are doing reads and writes to a database before (or even after) sending the message, your queries are probably unoptimized and slowing down the processing of the page.
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
 
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.