I'm using PEAR Mail_Queue for sending out newsletters. I have struggled so much with PEAR Mail, but I'm finally at a point where everything seems to work perfect. I'm keeping the queue and using the callback functionality to update my log.
Now I have a new problem. I want to be able to send out an e-mail again, but to another e-mail address. For instance, if a user writes me to tell me that he didn't receive an e-mail because it was sent to a wrong e-mail address. I want to be able to send the same e-mail to another e-mail address without having to generate it again.
Fortunately I can use the pear mail queue. I have the queue id, so I am able to use the sendMailById()
method on the Mail_Queue object, but it doesn't allow me to change the recipient e-mail address.
I'm thinking now that the only way out is to change the recipient field in the pear queue and use sendMailById()
and then change it back after the e-mail is sent. Do you have any other suggestions?