I am trying to attach a file to a notification, but have not been able to succeed in doing this.
My setup is as follows:
I have implemented a custom notification event using a monitor (extending NotificationMonitorBase) and a trigger (extending NotificationTriggerBase).
The setup is working as intended - I can create a new notification message in the back office, attach it to my custom event, trigger the event and see the email being sent and received correctly.
I have been trying to fiddle around with the message properties BodyTextIsFilePath and BodyText, but to no avail.
Does anyone have any suggestions as to how I can proceed?
The BodyTextIsFilePath property is not used (directly) by Merchello at the moment - so don't worry about that one especially with emails. It is/was intended for different sorts of notifications - like writing out to a file to be used by some external pickup mechanism.
To attach items to your email, there is a Sending event you can handle.
// Event args contains the MailMessage
SmtpNotificationGatewayMethod.Sending += [YourMethod];
Attaching files to notification messages
Hello,
I am trying to attach a file to a notification, but have not been able to succeed in doing this. My setup is as follows:
I have implemented a custom notification event using a monitor (extending NotificationMonitorBase) and a trigger (extending NotificationTriggerBase).
The setup is working as intended - I can create a new notification message in the back office, attach it to my custom event, trigger the event and see the email being sent and received correctly.
I have been trying to fiddle around with the message properties BodyTextIsFilePath and BodyText, but to no avail.
Does anyone have any suggestions as to how I can proceed?
BR, Peter
The BodyTextIsFilePath property is not used (directly) by Merchello at the moment - so don't worry about that one especially with emails. It is/was intended for different sorts of notifications - like writing out to a file to be used by some external pickup mechanism.
To attach items to your email, there is a
Sending
event you can handle.Well that wasn't difficult at all ^^
Thank you for the help :]
is working on a reply...