#1593 closed defect (bug) (fixed)
Fixing the "From" address on all emails.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5.1.2 |
Component: | Administration | Keywords: | email address from blocked bg|has-patch bg|commit bg|squashed |
Focuses: | Cc: |
Description
We keep having this small issue come up and manually fixing it. It might be others may have or soon might have a similar problem.
The core issue is some ISP's block generated mail messages if the "From" address is not within their domain. I suppose we can thank spammers for this.
Generally mail leaving Word Press very nicely uses the administrator email adddress as the "From" address and everything works as expected.
However, there is at least one place when someone makes a comment on an item, after it gets approved, Word Press sends a message to the originator of the item showing it coming from the creator of the comment.
Of couse the creator of the comment is generally the email address of the person who made the comment and is going to be off in some other domain which immediately gets blocked.
So we locate these and manually re-code to make the "From" address be the admin login and add a "Reply-to:" in the header to allow an easy reply to the creator of the comment.
To make it easy....could you please fix this in some future release to spare us this pain (finding the location in the code takes some time and I am not sure this is the only case this event occurs.).
Our suggestion would be ...
1) Use the RFC822 field "Sender" to always to be the Administrator email address as configured. (Currently Word Press does not set this field in any email headers.)
2) Set the RFC822 field "Reply-to" to what is the "from" field
3) Set the RFC822 field "From" the way you do right now.
I suppose if you want to do just the minimum you could add the "Sender" field with the administrator email to all messages and call it a day.
This would greatly easy our workload when we configure Word Press.
It would also perhaps be more elegant addressing since the "administrator" on the server is really the one generating the message even though you might be doing it on "behalf" of the person creating the item. (Check the example in RFC822 for a example of this usage)
Let us know what you think.
Thanks for the consideration.
Bernie
Attachments (2)
Change History (14)
#2
@
20 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
I've been having this problem as well. We need to start specifying a From address. I'll work on a patch.
#3
@
20 years ago
- Milestone set to 1.6
- Resolution set to fixed
- Status changed from assigned to closed
Okay, looked into it... and it is fixed in 1.6 using wp_mail(), if the 4th param (headers) is blank, it provides a From:
#4
@
20 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I'm not convinced this is fixed so reopening.
wp_notify_postauthor in trunk/wp-includes/pluggable-functions.php calls wp_mail() with a non-blank headers which includes already a From: line with the commenters email address in it:
if ('' == $comment->comment_author_email || '' == $comment->comment_author) { $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>'; } else { $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; } $message_headers = "MIME-Version: 1.0\n" . "$from\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
#10
@
20 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The last part of the patch didn't make it into the commit. The $reply_to var is being set, but the part where it is added into the headers is missing. The second patch fixes it.
Has there been any changed to this? Today I noticed another failed email message due to "sender not in domain". We are going to have to look around to see where this comes from. Seems like I am always looking for this one.
Thanks again for a great product and hope this gets corrected. I would think others would start having this problem also.
Bernie
This is on version 1.5.1.3