1

Hey I have a problem that i need to fix for a client. I have to send emails from different email addresses in different circumstances. Is it possible that I can setup multiple system email addresses and use one of them in my different plugins?

I tried to change the fromEmail attribute as well as the sender attribute on the email model but it still sends from the same email (which I thought would be the case ).

Anyway please let me know if there is any plugin out there that can do that.

Thanks in advance!

2
  • What do you mean by "and use one of them in my different plugins"? Commented Feb 10, 2015 at 16:41
  • I just meant that in general right now I am sending emails as craft()->email->sendEmail($email); and I would like to specify the sender email when I do that. Commented Feb 12, 2015 at 2:49

2 Answers 2

3

Out of the box, Craft doesn't support sending with multiple email addresses unless you change the email settings each time you need to send from the respective email address.

Craft does allow plugins to do this though. I know of two to consider, and present them in alphabetical order:

2

Postmaster for Craft by ObjectiveHTML is a powerful notification plugin that can send emails based on a number of different criteria and triggers. It also has it's own API that you can access in your own plugins.

I'd start with Postmaster and see if can do what you want out of the box, then look at possibly exploiting the API if you need a more custom solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.