Description
This hook allows you to filter the body content of the email that is sent to a user when using moderated registration and their registration is approved.
Some important considerations:
- In the default configuration of the plugin, a user registers and is sent a random password via email to verify that the user provided a valid email address. If you run the plugin in this configuration and you are using this filter, the user will receive a password in this email.
- If registration is moderated and the random initial password is used (the default), you should send a password in this email.
- If you are using moderated registration AND user defined passwords, and you want to send the user a copy of their chosen password via email, you should NOT send it in this email, but rather the initial email that is sent to the user (filtered by wpmem_email_newmod).
Usage
add_filter( 'wpmem_email_appmod', 'my_email_filter' ); function my_email_filter( $email_content ) { // the content of the email comes to // the filter in the parameter $email_content // you can do whatever you want to it here: // add to it: $email_content = "This is added to the beginning" . $email_content . "I put this on the end"; // or you could use something like php's // str_replace to filter the string and // add/remove content, etc. // whatever you do, you need to return // the filtered result: return $email_content; }
See a list of all filter and action hooks