Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey there :)
Im using this to send a mail from codebehind:
EmailTemplateService.Instance.Get(1, 3).Send(order);
It works great but if i want to add something to the subject of the mail, can i do that ? The customer wants the orderid to be there.
Hook into the EmailSending event :)
Arh awesome :)
For others on same position i made a class like this :
using System.Reflection; using TeaCommerce.Api.Models; using TeaCommerce.Api.Notifications; using Umbraco.Core; namespace MyProject.Web.EventHandler { public class TcEmailHandler :ApplicationEventHandler { public TcEmailHandler() { NotificationCenter.EmailTemplate.MailSending += Mail_Sending; } private void Mail_Sending(EmailTemplate emailTemplate, MailSendingEventArgs e) { e.MailMessage.Subject = e.MailMessage.Subject + " #" + e.Order.Properties["CustomIdProp"]; } } }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Sending email from codebehind and changing subject
Hey there :)
Im using this to send a mail from codebehind:
It works great but if i want to add something to the subject of the mail, can i do that ? The customer wants the orderid to be there.
Hook into the EmailSending event :)
Arh awesome :)
For others on same position i made a class like this :
is working on a reply...