Step to send a transaction mail

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

nmejane
Posts: 14
Joined: Fri Jul 05, 2013 3:29 pm

Step to send a transaction mail

Post by nmejane »

Hello,

I want to send a email to an user when he create an account on my web site.
So, to do that, I use openemm web services.
What are the steps to do that in openemm ?

First, I created a mailinglist and created a mailing with a static content for the moment.
After that, I use webservice to add a subscriber to the mailinglist, and send the mail.
But, when an new user create an account on my web site, I must delete the existant subsciber from the mailing list and after that add the new one.

I want to know if all my step are corrects and if this is the way to do when you when to send a transaction mail from openemm ?

thank
Anton
Posts: 46
Joined: Sun Jun 24, 2012 9:58 pm

Re: Step to send a transaction mail

Post by Anton »

Hi,

This is a bit late but anyway, I'm also interested in the "proper" answer, as I haven't got any yet. It appears that transactionals may be one of the weak points of openemm. At the very least, the documentation is seriously lacking on the subject. Did you actually make this work? If I understand correctly, you have created a mailinglist, you then create a user via the webservice, add it to the mailinglist, create a new mailing (again, probably via the web services) and send it. Is that right? You then delete the user so you can repeat the process for a new user. If so, I did not do it this way, and I don't think it's the best way.

The history you work up with a particular subscriber is very valuable and you shouldn't be deleting them. One thing you could do is simply remove them from the mailinglist - meaning you keep the subscribers history. That way if you need to send them another email you can just add them to the correct mailinglist and send when needed. You are probably keeping the openemm subscriber_id in your site db so that should be easy.

I solved this by "reverse engineering" UID string creation from the code (not all of the ids that are hashed to make it are needed for each task) and made a dumb http GET call to a form connected to an action to send the (action-based) mailing. It's damned ugly, but gets the job done. That means I can even keep the user in the mailinglist.

The action system is really powerful in openemm and there should definitely be a way to trigger an action from a web service - currently the system seems to want to force you to do stuff via openemm forms rather than open up the power via WS. I'm not going to have any time in the next couple of months but I'll definitely have a go at adding it at some stage.
Post Reply