I'm trying to find an existing Drupal module to fit the bill: basically, when an email fails to send, it should save the email and automatically attempt to resend the email later. I'm using the SMTP module to relay emails through an SMTP gateway (required by the hosting provider), but every once in a while the connection is refused - probably due to the gateway being too busy.
+2
A:
Check the MailQ module. While its main purpose is to send mails in batches on cron, it also provides a 'retry on failure' option. If your cron runs frequent enough, this might be ok for your case. Otherwise it might serve as an example on how to implement your own retry mechanism.
Henrik Opel
2010-05-17 10:57:23