Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Peter 27 posts 192 karma points
    Sep 29, 2016 @ 08:25

    Attaching files to notification messages


    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

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 29, 2016 @ 15:05
    Rusty Swayne

    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];
  • Peter 27 posts 192 karma points
    Sep 30, 2016 @ 10:48

    Well that wasn't difficult at all ^^

    Thank you for the help :]

Please Sign in or register to post replies

Write your reply to: