#53065 closed enhancement (invalid)
wp_mail return values should be filterable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Keywords: | 2nd-opinion | |
Focuses: | Cc: |
Description
Firstly yes I know wp_amil is a pluggable function.
But right now having to overwrite thw whole function just to be bale to change the return value of wp_mail is not only overkill but limits ofrward compatibility of any code written.
I propose that the return values be filterable.
My ow use case is that ive built an email queue and filter wp_mail attaributes to force emails onto the queue. The problem this causes is that other plugins are saying that they emails are not sent (which is sort of true in the sense they are not sent right away, but are later)
A filter would overcome this problem and I am sure similar ones for other users
Change History (4)
#2
@
4 years ago
I think an example of how the new filter could be used would be helpful here.
Perhaps the existing pre_wp_mail
filter might work for this use case?
Thanks for this ticket, @shawfactor!
I can't think of any problems this would cause at the moment. Though I would like to seek more feedback on this.