Page 1 of 1

How to set the name of sender in the From field

Posted: Sun Oct 19, 2008 12:43 am
by parka
Hi all,

I've a hosting account with bluehost.com. They are sending out my emails but the From field isn't what I expected.

It's something like this.
from example1@example.bluehost.com
reply-to Name of Sender <admin@example.com>
to recipient@gmail.com
date Sun, Oct 19, 2008 at 12:45 AM
subject Subject title for email (testing)
mailed-by example.bluehost.com
When I tested it on my localhost home server, it was like this, which is what I need.
from Name of Sender <admin@example.com>
reply-to Name of Sender <admin@example.com>
to recipient@gmail.com
date Sun, Oct 19, 2008 at 12:45 AM
subject Subject title for email (testing)
I'm using the following code.

Code: Select all

$sSwiftSender = new Swift_Address('admin@example.com', 'Name of Sender');
    
$swift->send($message, 'recipient@gmail.com', $sSwiftSender)
Is there anyway to configure the From field? Or this is it, the From field is controlled by my web host (bluehost.com)?

Re: How to set the name of sender in the From field

Posted: Sun Oct 19, 2008 1:34 am
by parka
Ok. I've solve it.

It was because I haven't created that email account, so it doesn't exists, and that's why it was using my web host's email address.