• Resolved rainafarai

    (@rainafarai)


    Hi thx for this nice plugin …. I want to send the welcome email not only when user register but when i click a button on the user panel in backend
    maybe the user lost the firts mail with important infos.
    .. tried many ways can you help me to trigger the “welcome email ” by php in other section of the site ?

    function send_welcome_email($user_id) {
        // Check if the BNFW class exists
        if (class_exists('BNFW')) {
            // Instantiate the BNFW class
            $bnfw = BNFW::factory();
    
            // Check if the BNFW object is successfully created
            if ($bnfw instanceof BNFW) {
                // Call the method to send the welcome email
                $bnfw->welcome_email($user_id);
                echo "Welcome email sent to user with ID: " . $user_id;
            } else {
                echo "Failed to instantiate BNFW object.";
            }
        } else {
            echo "BNFW class not found.";
        }
    }
    
    // Usage example: Send welcome email for user with ID 1
    $user_id = 777;
    send_welcome_email($user_id);
Viewing 1 replies (of 1 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @rainafarai,
    Thanks for your message.

    BNFW’s aim is to provide an easy-to-use UI for managing email notifications and doesn’t provide a way to trigger notifications programatically or via custom code at this time.

    If you wish to add this functionality without using BNFW, you will need to use custom code and your own email notification and template.

    Sorry I can’t help more.

Viewing 1 replies (of 1 total)
  • The topic ‘send welcome_email by function’ is closed to new replies.