swiftmailer | Change the To: header

6 posts by 2 authors in: Forums > CMS Builder
Last Post: October 19, 2015   (RSS)

By ht1080z - October 15, 2015

Hi,

How can i set the name of the sender in the swiftMailer globally?

->setFrom(array('no-reply@email.com'=>'Example sender'))

there is an option in the documentation but i cannot manage to change the common.php swiftmailer part to do it.

I need to set this with the same sender name for all mails with mail templates that send from my system.

Please help,
Karls

By Dave - October 16, 2015

Hi Karls, 

Ideally you want to avoid hacking the code if possible.  Can't you just set that in the Email Templates menu?  Either set to an email or to #settings.adminEmail#?

Dave Edis - Senior Developer
interactivetools.com

By ht1080z - October 16, 2015

Hi Dave,

I don't understand, please clear this for me better.

(I want to change the default sender email to sender name everywhere.)

Can i set the "From" in the email template to a desired name and not set this with email?

Thank you,
Karls

By ht1080z - October 19, 2015

Hi Dave,

Thank you for your reply..

My question is really just try to clarify if i can use any name instead of email address in the mail templates From fields.

It is not a problem for me to change one by one after that.

Karls

By Dave - October 19, 2015

Hi Karls, 

Ok, sorry I misunderstood!  You can use this format when entering emails under "Email Templates" or for "Admin Email" under Admin > General

Dave Edis <dave@interactivetools.com>

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com