Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#7427 closed enhancement (fixed)

New actionhook bp_send_mail

Reported by: mahype's profile mahype Owned by: djpaul's profile DJPaul
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.5.0
Component: Emails Keywords: dev-feedback
Cc:

Description

At the moment it is not possible to change email content before sending depending on who is the recipient, because there is no actionhook. In the added diff I added one.

Attachments (2)

7427.diff (962 bytes) - added by mahype 8 years ago.
Actionhook bp_send_email
7427.2.diff (1.2 KB) - added by mahype 8 years ago.
Added $args to arguments

Download all attachments as: .zip

Change History (7)

@mahype
8 years ago

Actionhook bp_send_email

@mahype
8 years ago

Added $args to arguments

#1 @r-a-y
8 years ago

It's possible to modify the email post object on the 'bp_email_validate' filter with the second BP_Mail parameter, but I'll let @djpaul chime in here.

Last edited 8 years ago by r-a-y (previous) (diff)

#2 @r-a-y
8 years ago

  • Component changed from Core to Emails
  • Keywords dev-feedback added
  • Milestone changed from 2.8 to Awaiting Review
  • Owner set to DJPaul
  • Version set to 2.5.0

#3 @mahype
8 years ago

There is an actionhook, but it's no reference in the object parameter. Also I would say this would be a very hidden way to offer the people an influence to the content of the email. I not came on the idea to look at this part of the code.

Last edited 8 years ago by mahype (previous) (diff)

#4 @DJPaul
8 years ago

  • Milestone changed from Awaiting Review to 2.8

I like the idea of having a dedicated action for this; it'll protect the use case if that validate filter ever changes its purpose. (I also think that in the validate filter's case, the email object isn't changeable by reference).

#5 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 11401:

Emails: add action before email is validated and sent.

Allows third-party plugins to customise the email after BuddyPress has built it.

Fixes #7427

Props mahype

Note: See TracTickets for help on using tickets.