Jump to content

quickening a send mail script


freelance84

Recommended Posts

 

site x on ubuntu 11.04 server with a tiny 256mb ram.

site x uses sSMTP to pass mail to a real SMTP server.

site x used to be on a shared host and php mail used the hosts SMTP server and mail was sent pretty damn quick, but now using sSMTP is little longer. It seems to take 3-4 seconds instead of almost instantly before.

 

structure of a script in question:

1-user fills form out and submits to it self.

2-php then validates everything inc. captcha

3-if everything is ok it then calls the relevant email script for that page which in turn calls the phpmailer class and sends the mail.

4-after the mail has sent the script then continues down and prints the html with a message telling the user the mail was sent.

 

Is there a way of restructuring the simple contact form to give the appearance of a quicker running?

 

(i thought maybe move the sending of the mail after validating to after the message sent html, however the user could potentially click away instantly and this might result in the script not completing the send mail?

or possibly having some sort of queueing facility: pass the mail to a email queue using mysql and cron and the send mail script?)

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.