-
Not necessarily PHPMailer related question, but maybe interesting for other users of this fine library: In my company, my colleagues work with lots of different HTML forms which send emails after submitting them. From time to time (let's say every 5,000th email) cannot be sent, because the hoster's smpt server is unavailable. I receive the error message from the PHPMailer object, which is fine, but in such cases I'd like to save those emails (including attachments) and store them in a database, so that I can try to resend them with a cron job. Is that possible in an easy way, like "exporting a PHPMailer object to blob" or something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
No, PHPMailer doesn't have a built-in means of doing this (other than stock serialize/unserialize) so you will need to reconstruct messages. Before doing that though, I'd look into making better use of your own mail server. Mail servers are really good at retrying, far more efficient than anything you could write in PHP! |
Beta Was this translation helpful? Give feedback.
No, PHPMailer doesn't have a built-in means of doing this (other than stock serialize/unserialize) so you will need to reconstruct messages. Before doing that though, I'd look into making better use of your own mail server. Mail servers are really good at retrying, far more efficient than anything you could write in PHP!