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!

  • What do you mean by "and use one of them in my different plugins"? – Ben Parizek Feb 10 '15 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. – Moin Qidwai Feb 12 '15 at 2:49
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:

|improve this answer|||||
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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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