Personalizing senders name?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
cybercog
Forum Newbie
Posts: 20
Joined: Sat Oct 06, 2007 10:35 pm

Personalizing senders name?

Post 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
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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"));
cybercog
Forum Newbie
Posts: 20
Joined: Sat Oct 06, 2007 10:35 pm

Post 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
Post Reply