Roundcube Community Forum

 

new plugin: Mass Mailing (request/help)

Started by Cooldown, October 08, 2010, 06:33:45 AM

Previous topic - Next topic

Cooldown

Hi,

i hope this is the right place to discuss this ^^

Some Infos
Im currently implementing roundcube 0.4.1 into a crm. The old mailing module was a self made frontend with a self made imapi client and smtp module as a backend. This module was programmed years ago and not very well designed .. it did his job but since the imapiclient and smtp module is currently not compatible with newer mailservers its time to replace the whole mailing module with roundcube.

One of the features was sending mails to a group of recipients separately cause if you send mails to lets say ... 50 recipients with one mail very often via the bcc or cc field you will shortly be marked as spam plus every recipient will see the email addresses IF send via CC. Furthermore .. some nasty spam filters also checks the BCC and if more than x recipients present this will be marked as spam too. So this is needed if you send mails to a big mailinglist

Some researches i've done
- As far as i know roundcube don't have those hooks to implement this as an api based plugin out of the box. Only a message_sent hook is present for logging purpose ... maybe i will experiment a bit with it later

- In 0.4.1 groups could be created, renamed, deleted via the addressbook

- Groups are accessible via the autocompleter in compose window

- the "group-expand" trigger provides the group name, group id, recipients list after clicked on the chosen group in autocompleter list

- Some steps/
/*.inc files could be modified to do what i want but .. then the client will not be easly updateable (currently mostly everything is done via the plugin api)

- I can override the function rcmail.replace_group_recipients to prevent roundcube from resolving the group name into a list of recipients

if doing so, i could not send the email cause of the "is the email valid" function.

Planned Features
- The user should only see the Groups Name (i dont care if there is a count of recipients in the name too)
- mixed adding of groups and emailaddresses
- Maybe the user should be informed about whats going on via the display_message function or via a color change of the bottom row or something ...

Trigger: if one Mailing-Group is present send it seperately

(optional: configureable method of overriding this behavior in settings section, maybe it should be limited to lets say 5 as a default and only above this limit messages will be send seperately)

Some thoughts
Method 1
- After disabling the recipient resolver, set an env var inside rcmail to bypass the checkemail function
- make use of a hook. maybe message_sent(?) cause this is the email with the header and body. So it should be possible to grab this and redirect it to the send mail function after resolving the groups to recipients internaly.

Method 2
- Same as M1 but instead of using message_sent hook use an earlier function to resolve group names to recipients create draft messages for each recipient and save each message id in an array.
- Trigger sending draft message with id inside rcmail (i think i remember a function that sends a draft message via rcmail.command)


I hope you guys understand what this plugin should do and maybe some of you could give me some advice "how it could be done" or maybe this is a planned feature? That would be awesome =)

Regards, Cooldown

EDIT: It would be helpful if a checkbox in compose form could be added named something like "send mail to each recipient individually". Everything else could then be implemented via existing hooks. Like tune the output a bit in case of clicking a group (it will then be resolved to emailaddresses) show additional messagefields. In case of sending to a campaign (this is a group also) show the campaign name and set the "To" field to visibility:hidden

chichi

A Mailing-List function would be great. I did not find a plugin for this. Right now I use a separate php-mailer-program which connects to the adress-book MySQL database of roundcube 0.4. :)

chichi

I did read about the listcommands-plugin here in the forum. Is this for handling mailing-lists? I cant get it working.