Copied to clipboard

Flag this post as spam?

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


  • Victor Bjørholm 33 posts 103 karma points
    17 days ago
    Victor Bjørholm
    0

    Send multiple emails at time of purchace

    Hi Matt, I finally have my shop working. At least for Europe :D However I would like to be able to automatize the shipping inquiry email process. This would be an email sent at the same time as the order confirmation email, and almost containing the same information. Any ideas on how to proceed with this? I thought about doing it directly in the source code https://github.com/vendrhub/vendr-checkout, but I can't seem to find out where the email actually gets sent. Any input would be greatly appreciated :)

  • Matt Brailsford 2657 posts 13188 karma points MVP 7x c-trib
    17 days ago
    Matt Brailsford
    0

    Hi Victor,

    Sure. Well for this you'd need to setup some event handlers to listen for the order being finalized and then send the email.

    You can find some docs on events here https://vendr.net/docs/core/1-2-0/key-concepts/events/ and a list of all available notofaction events to listen for here https://vendr.net/docs/core/1-2-0/reference/vendr-core-events/#vendrcoreeventsnotification-namespace (though you'll probably just want the OrderFinalizedNotification)

    In your handler, you can then use the IEmailTemplateService to fetch your defined email and then call emailTemplateService.SendEmail to actually send the email.

    Hope this helps

    Matt

  • Victor Bjørholm 33 posts 103 karma points
    14 days ago
    Victor Bjørholm
    0

    Sorry about the late reply. But thanks a lot! Setting up the event handlers seems easy enough, but I wonder how the emailTemplateSevice is to be used? I can't seem to find much info about it in the docs, but maybe you have an example?

Please Sign in or register to post replies

Write your reply to:

Draft