This topic has 8 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #125992
     LearnToDesign
    Participant

    Hello,

    No welcome emails are being sent upon user activation.  All other emails seem to be sending no problem.  I haven’t had any welcome emails since configuring the email server and didn’t know users were supposed to get them until I read other posts.

    I have tried to resolve the issue 2 ways.

    1) I clicked the emails tab and checked to see if there are any welcome emails configured there and there are none.  I tried to create my own but there is no “upon user activation” situation.

    2)  I have added this function to functions.php

     

    //send a welcome email when a user account is activated
    add_action(‘bp_core_activated_user’,’kleo_welcome_user_notification’,10,3);
    function kleo_welcome_user_notification($user_id,$key=false,$user=false) {
    if(is_multisite())
    return ;// we don’t need it for multisite
    //send the welcome mail to user
    //welcome message
    $welcome_email = __( ‘Dear USER_DISPLAY_NAME,

    Your new account is set up.

    You can log in with the following information:
    Username: USERNAME
    LOGINLINK

    Thanks!

    SITE_NAME’ );
    //get user details
    $user = get_userdata( $user_id );
    //get site name
    $site_name = get_bloginfo(‘name’);
    //update the details in the welcome email
    $welcome_email = str_replace( ‘USER_DISPLAY_NAME’, $user->first_name, $welcome_email );
    $welcome_email = str_replace( ‘SITE_NAME’, $site_name, $welcome_email );
    $welcome_email = str_replace( ‘USERNAME’, $user->user_login, $welcome_email );
    $welcome_email = str_replace( ‘LOGINLINK’, wp_login_url(), $welcome_email );

    //from email
    $admin_email = get_site_option( ‘admin_email’ );

    if ( empty($admin_email) )
    $admin_email = ‘support@’ . $_SERVER[‘SERVER_NAME’];

    $from_name = $site_name;//from
    $message_headers = “From: \”{$from_name}\” \n” . “Content-Type: text/plain; charset=\”” . get_option(‘blog_charset’) . “\”\n”;

    //EMAIL SUBJECT
    $subject = sprintf(__(‘Welcome to %1$s ‘), $site_name) ;
    //SEND THE EMAIL
    wp_mail($user->user_email, $subject, $welcome_email, $message_headers);

    return true;
    }

    —————

    The above function didn’t result in any welcome emails either.

    Does anyone have any other suggestions?

    #126102
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #126151
     LearnToDesign
    Participant

    Thank you Laura!

    #126204
     Radu
    Moderator

    Hi,

    Remove that code from functions.php, please try this plugin https://wordpress.org/plugins/wp-mail-smtp/ and configure it with required details.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #126233
     LearnToDesign
    Participant

    Hi Radu,

    After installing the above plugin, same result.

    The user gets an activation email, but no welcome email.

    #126339
     Radu
    Moderator

    Hi,

    You can try to use this plugin : https://wordpress.org/plugins/welcome-pack/ or this possiible solution : https://buddydev.com/buddypress/send-welcome-email-to-users-when-they-activate-their-account-on-wordpress-buddypress-based-social-network/

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #126894
     LearnToDesign
    Participant

    Hi Radu,

    Sorry for the late reply. That plugin hasn’t been updated in over 2 years and has been marked not working.

    As for the other solution, that is the first solution I tried and that didn’t work either.

    #126896
     LearnToDesign
    Participant

    Radu,

    I want to correct myself. The Welcome Pack works. The user gets a private message. What I really wanted was the user to be sent an email, as it is more informal and comes from the website rather than a specific user. However, this will do.

    #127055
     Radu
    Moderator

    Great

    Have a nice week

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?