XML Mail – Batch sending and easy logging

I ended up purchasing a relay service from Nettica.com, so this batch emailing idea is not going to be of much use to me. In any case, I think its a pretty good way to control emails. If your site sends many emails per day, then a batch email setup might be a good option.

Using a batch emailing method, first off, allows for an inherent logging ability built into the process. Every time the application wants to send an email, it would write the email (XML) to send.xml. Periodically, from an internal or external server, the send.xml file is processed, and then automatically backed up. This can be extended to eventually gzip the XML files, etc.

Secondly, if your site sends many emails, you may not want to consume resources (in real-time) sending them on demand. Instead, sending all emails every say 5 minutes, could possibly improve server performance.

A typical example code would be:

Code:
$mailObj = new xmlMail();
$mailObj->getHandle();
$mailObj->writeEmail($to,$cc,$bcc,$from,$from,$subject,$body);
$mailObj->closeHandle();

See the PHP Class here for more details.

Related Articles:

Follow me on Twitter!

Your Ad Here

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>