#2830 closed defect (bug) (wontfix)
Change the way t he domain is being retrieved for sending e-mails from wordpress@..
Reported by: | Woudloper | Owned by: | westi |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
On moment I have implemented Wordpress at my hosting provider in the Netherlands.
Last week they had send me an e-mail about new spam preventions they have taken as you can read hear (in Dutch).
What does this mean?
This means that the e-mail from should be from an existing domain, but my weblog is placed in a subdomain as followed:
http://weblog.domain.nl
The e-mail that is being generated from the pluggable function wp_mail is as followed:
wordpress@weblog.domain.nl
The problem:
The problem is, is that this isn't an existing mailaddress and thus the notifications of new comments, registrations, etc. aren't received to the to email address.
Suggestion/Solution:
Couldn't it be made possible that the e-mail from for the wp_mail function can be made customizable e.g. via the options within the dashboard. This way I can put in an existing e-mail address.
Extra:
See this reply on the forum of the hosting provider where they made a suggestion for the problem.
Attachments (1)
Change History (6)
#2
@
18 years ago
- Cc tacker added
There are many cases where the detected email address may be invalid, so please make this a configurable value.
#3
@
18 years ago
- Owner changed from anonymous to westi
- Status changed from new to assigned
I don't think this needs to be a core feature.
A very simple plugin (untested but should work fine) can be used to replace the builtin wp_mail function with one that sends from another address:
/* Plugin Name: Override Email Address Description: Allows you to override the email address used by wp_mail Author: Peter Westwood Version: 0.01 Author URI: http://blog.ftwr.co.uk/ */ function wp_mail($to, $subject, $message, $headers = '') { if( $headers == '' ) { $headers = "MIME-Version: 1.0\n" . "From: user@domain \n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n"; } return @mail($to, $subject, $message, $headers); }
Replacing user@domain in the above plugin and activating it will allow you to pick the email address you want the emails to originate from.
This plugin works because wp_mail is one of the pluggable functions that a plugin can override by defining it before WordPress
#4
@
18 years ago
- Resolution set to wontfix
- Status changed from assigned to closed
I agree with westi. I'd rather see this implemented as a plugin than cluttering the core with an option that only a small subset of the users will ever use.
I've taken westi's example one step further and added a configuration page to it, so you can set the email adres from the admin section. (The largly untested statement still stands though)
It was detected in 2.0.3. and not in 2.0.4.