On 2012-05-17 12:44 PM, Christian Boltz <pos...@cb...> wrote:
> Am Donnerstag, 17. Mai 2012 schrieb Tanstaafl:
>> On 2012-05-15 4:46 PM, David Goodwin<da...@co...> wrote:
>>> I suspect you'd actually want to make it become :
>>>
>>> my $from = "$name<$email>";
>>>
>>> But I don't know for certain.
>> I checked and there is no $name variable defined in the script... so,
>> any idea/suggestion for how to properly set it?
> As you already found out, you have to read it from the mailbox table.
>
>> Another thing is, the name should be in double quotes, and the email
>> should be in <> brackets, so how to properly accomplish that?
> Add the quotes and<...> ;-)
> Strictly speaking, the quotes around the name are not always needed, but
> I don't know the details.
My understanding is they are needed if there is any punctuation in the
name, ie a comma:
"Lastname, Firstname" <em...@ex...>
or an apostrophe:
"Michael O'Donnel" <em...@ex...>
The quotes are not need if the name is simply:
Firstname Lastname <em...@ex...>
> Additionally, you'll need to encode non-ASCII names (similar to
> how the subject is (hopefully - I didn't check the code) encoded).
>
> Please also make sure that the From still looks good when no realname is
> specified - don't add empty quotes or<...> in this case.
Well, again, since ianap, I'm not comfortable trying to do this, I'm
quite sure I'd break something in a really bad way...
I guess maybe it is harder than I thought it would be, or someone would
have simply come up with aone liner change adding in the $name variable
to the mix...
|