Developer forum

Forum » Development » Email Marketing - Attachment specific per user

Email Marketing - Attachment specific per user

Nuno Aguiar
Reply

Hi,

 

Using the "render the email-content for each recipient" feature, is it possible to attach a specific file for each user?

 

We need to figure out a way to send a (once a year) email to +25k users, where the PDF is specific per user. We were thinking to use Email Marketing so we don't have to reinvent the wheel.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

Maybe using a notification subscriber.

Or just link to the PDF from the email.

 
Nuno Aguiar
Reply

Hi Nicolai,

 

The link to PDF is not an option for this customer. He is very much against changing his ways, despite all the arguments we presented.

 

I was trying to get to find a notification subscriber for it, but I feel lost. I looked at this part of the documentation http://doc.dynamicweb.com/api8/#Dynamicweb~Dynamicweb.Notifications_namespace.html

 

Could you point me to the proper notification please?

 

Nuno

 
Nicolai Pedersen
Reply

Dynamicweb.EmailMarketing.Notifications.OnBeforeMerging

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Is that private by any chance? I don't see it. Only Email Messaging which does not have Notifications. Can you double check please?

 

Best Regards,

Nuno Aguiar

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Nuno,

You need to reference Dynamicweb.Modules.dll and then use the EmailMarketing namespace. Here's a full example:

using Dynamicweb.Extensibility;
using Dynamicweb.Modules.EmailMarketing;

namespace Magpul.Web.Helpers
{
  [Subscribe(Notifications.OnBeforeMerging)]
  public class Jadajada : NotificationSubscriber
  {
    public override void OnNotify(string notification, NotificationArgs args)
    {
      var mergeArgs = args as Notifications.OnBeforeMergingNotificationArgs;
    }
  }
}


mergeArgs gives you access to the Recipient and the Message.

Hope this helps,

Imar

 
Nuno Aguiar
Reply

Hi,

 

Gotcha, so the location is Dynamicweb.Modules.EmailMarketing.Notifications.OnBeforeMerging

 

The example,it helps, thanks. I can see it now.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum