Author Topic: How to send emails with unique content to different addresses at once  (Read 6467 times)

Offline paritycheck

  • Jr. Member
  • **
  • Posts: 36
Hi guys, I love the roundcube program - its just what I've been looking for.

We send emails to clients and normally the contents of the emails we send are pretty much the same except for a few basic details like name, country etc. Like for example we send to a numebr of contacts in the addressbook. The addressbook contains the first name and last name...I can extract the first and last names and append it to the message body but teh issue comes is that we send normally the same email to different contacts. And currently only one email body it seems can be sent to multiple addresses with the smtp_mail function.

Essentially is there a way to send different messages to different emails at once. Instead of having to like send the same email x number of time sto x different contacts with just a difference of the first and last name, isn't there a way to get around this programatically. :-[

I mean I tried calling the smtp_mail function in a loop passing in different parameters but it doesn't seem to work... please help guys

Offline bugler

  • Jr. Member
  • **
  • Posts: 54
Re: How to send emails with unique content to different addresses at once
« Reply #1 on: April 26, 2007, 09:36:23 AM »
There is no standard way to do that.

You would have to make your own programming. The program that sends mails is /program/steps/mail/sendmail.inc.

You would have to modify that program for your purposes.

You probably would also have to modify /program/steps/mail/compose.inc to have and interface to enter the recipients and the contect for each (somehow).

Good luck.

Offline paritycheck

  • Jr. Member
  • **
  • Posts: 36
Re: How to send emails with unique content to different addresses at once
« Reply #2 on: April 30, 2007, 08:52:25 AM »
Thanks I seemed to understand from the code that the only way to get it done was to hand code it. SO far for now I've basically just hardcoded the extra fields into the template file and simply called the sendmail function in a kind of loop - its sending the mails though but the issue I'm having now is to somehow log the progress of each extra mail sent.

I got it to work but then again its just a patch... is there any way to program plugins for roundcube btw?