Email With Templates Module - Multiple Senders

Hello, I’m working on an app that will have to send emails from two different email addresses. Does anyone know if it’s possible to do this with the Email with Templates module from the App Store? If not, any work-arounds to this problem will be greatly appreciated. Thanks!
2 answers

Yes, you can do this with Email Templates module.

One way to do this is to create a separate EmailSettings object for each email address you’ll need to send from.  I usually make a specialization of this entity in one of the modules in the project and add an attribute that indicates what each entry is used for so that I can retrieve the correct settings when I need to send an email.


Take a look at IVK_SendEmail and DS_GetEmailSettings in the EmailTemplate module.  I would copy those and modify as needed.

We did something similar where we actually took out all the SMTP portion of the module and replaced it with Microsoft Graph API.

We used all the logic for token replacement, which gives us the final HTML string for the body.  From there, you could use anything you want to send out.