Logging and memory usage
Posted: Wed May 14, 2008 10:06 am
Hi everyone
I'm in the process of converting our e-mail newsletter script over to SwiftMailer from PHPMailer, and I'm at the point where I need to start to consider what I'm going to do about logging.
We send 2-3 newsletters per day, to about 1500 recipients each. Currently we send using PHPMailer and nativemail, and the sending script is hosted on our ISPs webspace. I contacted them in advance and they approved this arrangement, we've not had any problems for a couple of years now.
I'm considering using SwiftMailer to send through SMTP using our ISPs relay, rather than with nativemail.
I've not decided whether to host the actual sending script on our ISPs webspace, or on our intranet Apache/PHP server. I will do testing to discover which is faster.
I'm planning on using the AntiFlood, BandwidthMonitor and Decorator plugins, and sending using the batchsend method. With enabled so the script can run without getting interrupted.
Here's what I'd like to be able to record...
I guess the memory analysis needs to use PHPs memory functions, and the timing again is something I can knock up with PHP's microtime
I'm then planning to send this log to the user via e-mail.
With ignore_user_abort enabled, is there a way I can be notified if the script terminates at any point, without reaching the end?
Thanks, B
I'm in the process of converting our e-mail newsletter script over to SwiftMailer from PHPMailer, and I'm at the point where I need to start to consider what I'm going to do about logging.
We send 2-3 newsletters per day, to about 1500 recipients each. Currently we send using PHPMailer and nativemail, and the sending script is hosted on our ISPs webspace. I contacted them in advance and they approved this arrangement, we've not had any problems for a couple of years now.
I'm considering using SwiftMailer to send through SMTP using our ISPs relay, rather than with nativemail.
I've not decided whether to host the actual sending script on our ISPs webspace, or on our intranet Apache/PHP server. I will do testing to discover which is faster.
I'm planning on using the AntiFlood, BandwidthMonitor and Decorator plugins, and sending using the batchsend method. With
Code: Select all
ignore_user_abort(TRUE)Here's what I'd like to be able to record...
- - Sent/failed totals
- Which recipients failed
- How long in total the sending/script took
- Peak and average memory usage
- Total SMTP bandwidth (BandwidthMonitor plugin)
I guess the memory analysis needs to use PHPs memory functions, and the timing again is something I can knock up with PHP's microtime
I'm then planning to send this log to the user via e-mail.
With ignore_user_abort enabled, is there a way I can be notified if the script terminates at any point, without reaching the end?
Thanks, B