Page 1 of 1

Personalizing senders name?

Posted: Thu Oct 11, 2007 6:01 am
by cybercog
Hello,

Yes it's me again, but things are going great. Excellent tool!

One question, I see how you can personalize recipients addresses, how about doing it for the senders address?

I used to be able to use:
$header .= "From: (My Cool Name Here) " . $from_email . "\r\n";
Doing it with swift mailer?
I haven't found that in the docs yet.

Thanks,

- Don

Posted: Thu Oct 11, 2007 8:15 am
by Chris Corbyn
The key is to use the Swift_Address class.

Code: Select all

$swift->send($msg, $recipients, new Swift_Address("your@email.com", "Your name"));

Posted: Thu Oct 11, 2007 10:52 am
by cybercog
Of course I thought to try that after I posted.

It has interesting results and effects on various email clients.

I'll post back what I find laster.

By the way, that you for your work on this mailer, I've learned allot by using it.
Works good to! ;-)

I'll see what I have left in my paypal account at the end of the week.

- Don