Woocommerce custom emails without header and footer

Seems I’ve managed to find the solution. $mailer = $woocommerce->mailer(); must be called before the Get mail template

function send_activation_link() {
  global $woocommerce;

  //My other code here....

  $mailer = $woocommerce->mailer();

  ob_start();

  // Get mail template
  woocommerce_get_template('emails/customer-reset-password-link.php', array(
    'user_login'    => $user_login,
    'blogname'      => $blogname,
    'email_heading' => $email_heading,
    'key'           => $key
  ));

  // Get contents
  $message = ob_get_clean();

  $mailer->send( $user_email, $subject, $message);
}
add_action( 'init', 'send_activation_link');