Developer forum

Forum » Development » Email marketing (abandoned cart) with a different sender email per user

Email marketing (abandoned cart) with a different sender email per user

Ricardo Pereira
Ricardo Pereira
Reply

Hi guys,

Is it possible to change the "from name" and "from email" of the abandoned cart email per each recipient user, based in some user field (recipient user)? There are some notification that allow me to do that?

It's for a DW8 solution (8.9) .

Thanks,
Ricardo


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Ricardo,

 

You can try to subscribe to Dynamicweb.Modules.EmailMarketing.Notifications.OnBeforeMerging. We did that for a project in the past (that you worked on) to add a different attachment per user.

 

Should be something like this


using Dynamicweb.Extensibility;
using System.Linq;
using System;

namespace JadaJada.Notifications
{

[Subscribe(Dynamicweb.Modules.EmailMarketing.Notifications.OnBeforeMerging)]

public class MarketingEmail : NotificationSubscriber

{

public override void OnNotify(string notification, NotificationArgs args)

{

var mergeArgs = args as Dynamicweb.Modules.EmailMarketing.Notifications.OnBeforeMergingNotificationArgs;

// Add your code here

}

}

}

 

Best Regards,

Nuno Aguiar

Votes for this answer: 1
 
Ricardo Pereira
Ricardo Pereira
Reply

Thank you, Nuno.

 

You must be logged in to post in the forum