Soluciona el envío de email de activación en Buddypress

Porque si te abres una cuenta en una red social es importante que certifiques que el email es tuyo, también lo es poder recibir ese email para validarla. Aquí un truco para que no te falle Buddypress.



Una cosa horrible que pasa cuando usas el querido Buddypress es que el envío de email de activación no acaba de funcionar bien del todo. Navegando por los mares de bits encontré este truco que apunté en un post-it y ahora no recuerdo de quién era, pero mío no ¡eso seguro!

Con hacer lo que sigue a mi me ha funcionado bastante bien hasta ahora:

En buddypress/bp-core/bp-core-functions.php reemplazar:

'core-user-registration' => array(
/* translators: do not remove {} brackets or translate its contents. */
'post_title' => __( '[{{{site.name}}}] Activate your account', 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_content' => __( "Thanks for registering!nnTo complete the activation of your account, go to the following link and click on the <strong>Activate</strong> button:n<a href="{{{activate.url}}}">{{{activate.url}}}</a>nnIf the 'Activation Key' field is empty, copy and paste the following into the field - {{key}}", 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_excerpt' => __( "Thanks for registering!nnTo complete the activation of your account, go to the following link and click on the 'Activate' button: {{{activate.url}}}nnIf the 'Activation Key' field is empty, copy and paste the following into the field - {{key}}", 'buddypress' )
),
'core-user-registration-with-blog' => array(
/* translators: do not remove {} brackets or translate its contents. */
'post_title' => __( '[{{{site.name}}}] Activate {{{user-site.url}}}', 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_content' => __( "Thanks for registering!nnTo complete the activation of your account and site, go to the following link: <a href="{{{activate-site.url}}}">{{{activate-site.url}}}</a>.nnAfter you activate, you can visit your site at <a href="{{{user-site.url}}}">{{{user-site.url}}}</a>.", 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_excerpt' => __( "Thanks for registering!nnTo complete the activation of your account and site, go to the following link: {{{activate-site.url}}}nnAfter you activate, you can visit your site at {{{user-site.url}}}.", 'buddypress' ),
'args' => array(
'multisite' => true,
),
),

 

Por

'core-user-registration' => array(
/* translators: do not remove {} brackets or translate its contents. */
'post_title' => __( '[{{{site.name}}}] Activate your account', 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_content' => __( "Thanks for registering!nnTo complete the activation of your account, go to the following link: <a href="{{{activate.url}}}">{{{activate.url}}}</a>", 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_excerpt' => __( "Thanks for registering!nnTo complete the activation of your account, go to the following link: {{{activate.url}}}", 'buddypress' ),
),
'core-user-registration-with-blog' => array(
/* translators: do not remove {} brackets or translate its contents. */
'post_title' => __( '[{{{site.name}}}] Activate {{{user-site.url}}}', 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_content' => __( "Thanks for registering!nnTo complete the activation of your account and site, go to the following link: <a href="{{{activate-site.url}}}">{{{activate-site.url}}}</a>.nnAfter you activate, you can visit your site at <a href="{{{user-site.url}}}">{{{user-site.url}}}</a>.", 'buddypress' ),
/* translators: do not remove {} brackets or translate its contents. */
'post_excerpt' => __( "Thanks for registering!nnTo complete the activation of your account and site, go to the following link: {{{activate-site.url}}}nnAfter you activate, you can visit your site at {{{user-site.url}}}.", 'buddypress' ),

),

 

Luego te recomendaría que instales el plugin WP Mail SMTP y en dirección del remitente puedas colocar un gmail u otra dirección, siempre y cuando haciendo los tests funcione. Para los test prueba con correos que sean de un dominio propio, tipo @comunicacionabierta.net.

Suscribirte
Notificación de
guest
0 Comments
Inline Feedbacks
View all comments