Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Primero configuramos nombre y email del remitente
- //Este es el filtro del mail de remitente:
- add_filter('wp_mail_from', 'new_mail_from');
- //Este es el filtro para el nombre del remitente:
- add_filter('wp_mail_from_name', 'new_mail_from_name');
- //Aquí es donde va el nuevo email remitente. Cámbialo a tu gusto
- function new_mail_from($old) {
- return 'miemail@midominio.com';
- }
- //Aquí es donde va el nombre del remitente
- function new_mail_from_name($old) {
- return 'Nombre del remitente';
- }
- //A continuación hacemos un gancho en el asunto y configuramos una función para cambiarlo
- add_filter( 'wpmu_signup_user_notification_subject', 'my_activation_subject', 10, 4 );
- function my_activation_subject( $text ) {
- //Aquí es donde introducimos el nuevo asunto para el email de activación
- return 'Personalízame: Tienes que activar tu cuenta o lo que sea que quieras poner.';
- }
- // Para finalizar hacemos un gancho en el email y ejecutamos una función para modificar el mensaje
- add_filter('wpmu_signup_user_notification_email', 'my_custom_email_message', 10, 4);
- function my_custom_email_message($message, $user, $user_email, $key) {
- //Y este es el nuevo mensaje
- $message = sprintf(__(( "Para activar tu cuenta haz clic en el enlace siguiente:\n\n%s\n\n Luego bla bla bla.\n\n" ),
- $user, $user_email, $key, $meta),site_url( "?page=gf_activation&key=$key" ));
- return sprintf($message);
- }
Add Comment
Please, Sign In to add comment