Newsletter USER_NAME in Subject

e-Newsletter does not seem to respect the {USER_NAME} tag in the subject line. Is this working per design, or is there a way to insert the user's name in the subject?

    Vaughan

    Hi @BGilliom

    Unfortunately, this isn't supported in the subject, it is only valid in the body content.

    You can probably add this by editing the plugin. I will also add this to the feature requests for you.

    open e-newsletter/email-newsletter-files/class.functions.php

    Find around Line 1007

    $mail->From = $email_from;
            if( $email_from_name ) {
                $mail->FromName = $email_from_name;
            }
            $mail->Subject = $email_subject;

    Add this right above:

    $user = get_user_by( 'email', $email_to );
            if(!empty($user->user_login)) {
                $email_subject = str_replace( "{USER_NAME}", $user->user_login, $email_subject );
                $email_subject = str_replace( "%7BUSER_NAME%7D", $user->user_login, $email_subject );
            }

    Hope this helps