[FX.php List] [OFF] Slow response when sending PHP email?

Bob Patin bob at patin.com
Wed May 8 20:34:40 MDT 2013


Joel,

I haven't noticed it delaying things, but that may be because I always send mail after I've rendered the final page--which might be an invoice, for example. 

The issue that has been more troublesome for me has been when I have to generate a lot of records--for example, on some ticket orders I have to create as many as 13 records at one time, and that can take time. In that instance I've off-loaded the record creation to FileMaker, so that the site seems fast and responsive.

You can always try that--have FileMaker send the emails--although I really don't care for that at all. One of the web apps I'm about to rewrite has a function in it where emails go out from the database, and I plan to do away with that and do all sending straight from PHP.

I used to use a function someone gave me years ago, called "sock_mail" I believe. I use PHPMailer now though, mainly because it allows for attachments, and I send PDF files a lot these days in web apps.


Bob Patin
Longterm Solutions LLC
P.O. Box 3408
Brentwood, TN 37024
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
--
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting
On May 8, 2013, at 5:09 PM, Joel Shapiro <jsfmp at earthlink.net> wrote:

> Hi all
> 
> I haven't needed to send mail from PHP for a while but I may need to do so in an upcoming project.
> 
> One thing that has bothered me when I've used an email library (Swift Mailer or PHPMailer) is that it seems to take quite a long time (3+/- seconds) for the mail to send, thus delaying the loading of the 'results' page.  I understand that this way I can check for failed sending, but I generally don't want to delay things for the end user for that -- and I'd rather deal w/ them behind the scenes, on the server end.
> 
> How do others here deal with this?  Is there a way to off-load the email sending so that the user gets a quick response to their submission?  AJAX perhaps?
> 
> TIA,
> -Joel
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list