Opened 17 years ago
Closed 15 years ago
#618 closed Defect (fixed)
Inconsistency between EMAIL_FROM and EMAIL_FROM_NAME in email.inc
Reported by: | tstrunk | Owned by: | davea |
---|---|---|---|
Priority: | Trivial | Milestone: | Undetermined |
Component: | Web - Project | Version: | |
Keywords: | patch | Cc: |
Description
In WebConfig the documentation states:
EMAIL_FROM 'from' address for emails EMAIL_FROM_NAME 'from' name for emails
PHP-Mailer respects these options; the internal php mail command does not:
email.inc (49-50):
if (defined('EMAIL_FROM')) { $headers = "From: ". EMAIL_FROM;
should be:
if ( defined('EMAIL_FROM') && defined('EMAIL_FROM_NAME') ) { $headers = "From: ".EMAIL_FROM_NAME."@".EMAIL_FROM;
Otherwise by specifying for example on host: "hostnumber1.com":
EMAIL_FROM - "hostnumber2.de"
EMAIL_FROM_NAME - "correct_username"
a password retrieval mail would be mailed to: hostnumber2.de@…
Revision is 14746
Change History (4)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Ah, yes - I misunderstood the documentation there. Thanks for clearing it up.
comment:3 Changed 17 years ago by
Keywords: | patch added |
---|
There is still a bug; although the fix is not what you initially suggested.
EMAIL_FROM
is the full email address, not the hostname.EMAIL_FROM_NAME
is the "displayed" name.It should be:
So that with:
It gets sent with:
I'm not too sure if
EMAIL_FROM_NAME
would work correctly if it had an@
sign, as would be common to use "Foo@Home admin"...