freelance84 Posted November 12, 2011 Share Posted November 12, 2011 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?) Quote Link to comment https://forums.phpfreaks.com/topic/250985-quickening-a-send-mail-script/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.