23455 Posts in 18904 Topics by 2877 members
|Go to End|
9 July 2009 at 12:27pm
I see how to set the "from" email address but I do not see how to set the "from" name.
How can I make an email from "Foo Bar <email@example.com>" ?
$email = new Email($from, $to, $subject, $body);
9 July 2009 at 6:41pm
Chances are new Email(Foo Bar<firstname.lastname@example.org>, .... ) will work fine
29 October 2009 at 1:54am Last edited: 26 November 2009 12:26am
It's not working for me. It seems somewhere along the line extra angle brackets are added.
e.g. "Joe Bloggs <email@example.com>" is becoming "<Joe Bloggs <firstname.lastname@example.org>>" and the server throws the following:
[Warning] mail() [function.mail]: SMTP server response: 501 <Joe Bloggs <email@example.com>>: "@" or "." expected after "Joe"
Anyone else got this problem and/or a workaround?
9 March 2011 at 7:46am
I'm having this problem too... seems uncommon, since there isn't much on the forum (or the googler) about it. I get an "Invalid email: \'From Name <firstname.lastname@example.org>\'" when setting the from address like:
$from = "From Name <email@example.com>";
9 March 2011 at 8:56am
Just kidding! For me it was because I was using PHPMailer instead of the built-in mailer. Easily fixed.
|Go to Top|