Opened 14 years ago
Closed 10 years ago
#15594 closed enhancement (invalid)
make pluggable the multisite/"wpmu" mails
Reported by: | arena | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.1 |
Component: | Keywords: | ||
Focuses: | multisite | Cc: |
Description
such as the one that is generated in the first lines of
wp-admin/user-new.php
Attachments (1)
Change History (13)
#3
@
14 years ago
in wordpress before merging with wpmu,
wp_mail function and mails are all pluggable
in wpmu that is not the case.
I think all wpmu mails should be pluggable !
#4
@
14 years ago
What specific functions do you want to see as pluggable.
This ticket is lacking in detail :-(
#5
@
14 years ago
see wp_mail file attached from wordpress latest nightly build to show you that
For a mono site install, all mails are issued from wp-includes/pluggable.php except for
- wp-login.php:233 where there is a filter : 'retrieve_password_message' that allows you to completly override the wp_mail function.
- wp-mail.php:184: for posting posts via mails
For a multi site install none of the mails send are pluggable. Filtering the content is not enough when you want to send multipart mails (html & plaintext see MailPress plugin).
All the ms mails should be pluggable or at least have a specific filter such as in wp-login.php:233
hope this makes it clear !
Thanks
#6
@
14 years ago
If i was to replace every mention of "pluggable" with "Filterable" (ie. apply_filters(..)), would that be correct arena?
Basically, not all MU-generated emails filter the content through specific filters?
Now, Before the merge, I'm assuming wpmu -didn't- filter them either?
In the meantime, you can use the generic wp_mail filter, and switch based on the passed content/subject.
#7
@
14 years ago
Also possibly rather than a filter it should be an action that the default email sending function is hooked onto.
#8
@
14 years ago
If i was to replace every mention of "pluggable" with "Filterable" (ie. apply_filters(..)), would that be correct arena?
Looks good to me like this is done with filter 'retrieve_password_message' in wp-login.php
$message = apply_filters('retrieve_password_message', $message, $key); if ( $message && !wp_mail($user_email, $title, $message) ) wp_die( __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') );
#9
@
14 years ago
- Keywords multisite needs-patch added; 2nd-opinion removed
- Milestone changed from Awaiting Review to Future Release
- Type changed from feature request to enhancement
#10
@
10 years ago
It seems all the emails have (and have had) filters for the content since the merge with WPMU. Am I misinterpreting something here?
This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.
10 years ago
#12
@
10 years ago
- Keywords needs-patch removed
- Milestone Future Release deleted
- Resolution set to invalid
- Status changed from new to closed
It appears there may yet be at least one Multisite email contents that isn't filterable. I talked to @jeremyfelt and the consensus is to close this ticket and open new ones for individual emails as they're identified.
There's a filter already, isn't it sufficient? Are there any emails without a filter?