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

Joel Shapiro jsfmp at earthlink.net
Thu May 9 12:32:50 MDT 2013

Hi Bob

You don't see slower page loading when you include PHP mailing -- compared to the same page without emailing?  (or you just never checked?)  For me, adding in the mailing adds at least a couple/few additional seconds before the page will load.

Yeah, I've also seen that adding multiple new records is probably the slowest thing with CWP, and also found that calling an FM script instead to do the record creation is a LOT faster.  (I even blogged about it :).  I haven't, though, tested this in FM12.  Have you had a chance to see if adding multiple new records in FM12 is still really slow?

And lastly, out of curiosity, why don't you like to email from FMS?  I've given up my earlier belief that everything has to be pure PHP, and have toyed w/ the idea of calling an FM script from the PHP to have FMS send smtp emails.  I do realize this puts an additional load on the DB server -- as opposed to on the Web server...


On May 8, 2013, at 7:34 PM, Bob Patin wrote:

> 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
> _______________________________________________
> 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