Posted on 19/08/2022 09:44:40
Looks like they have a solution for when you don't have a BCC field.
But if you go the subscriber way, SendingConfirmationMailArgs (the Args class for the SendingConfirmationMail notification) exposes a MailMessage property. To that you should be able to add the Bcc, sort of like this (typed here, not tested):
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.SendingConfirmationMail)]
public class EcomCartSendingConfirmationMailObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
var sendingConfirmationMailArgs = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.SendingConfirmationMailArgs) args;
sendingConfirmationMailArgs.MailMessage.Bcc.Add(new MailAddress("someone@example.com");
}
}
Does that help?
Imar