Title: Generate an Account Activation Link Programatically
Last modified: November 29, 2024

---

# Generate an Account Activation Link Programatically

 *  Resolved [liquidonthedrums](https://wordpress.org/support/users/liquidonthedrums/)
 * (@liquidonthedrums)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/generate-an-account-activation-link-programatically/)
 * Hi,
 * I need to add a secondary Activation email for a different type of user and trigger
   it programatically. I have added the new template as per the docs ([https://docs.ultimatemember.com/article/1515-how-to-add-and-use-custom-email-templates](https://docs.ultimatemember.com/article/1515-how-to-add-and-use-custom-email-templates))
   
   I have a button within the email which uses the placeholder {account_activation_link},
   but this isn’t populated when the email is sent.
 * Should this placeholder work by default or do i need to generate the activation
   link myself? Appreciate any assistance.
   Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/generate-an-account-activation-link-programatically/#post-18169049)
 * [@liquidonthedrums](https://wordpress.org/support/users/liquidonthedrums/)
 * Yes, you must prepare the custom email template with your placeholder
 *     ```
       um_fetch_user( $user->ID );
       $args = array();
       $args['{account_activation_link}'] = um_user( 'account_activation_link' );
   
       UM()->mail()->send( $user->user_email, 'your_custom_email', $args );
       ```
   
 *  Thread Starter [liquidonthedrums](https://wordpress.org/support/users/liquidonthedrums/)
 * (@liquidonthedrums)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/generate-an-account-activation-link-programatically/#post-18171852)
 * That has done it. Thanks very much for the quick support!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Generate an Account Activation Link Programatically’ is closed to new
replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [liquidonthedrums](https://wordpress.org/support/users/liquidonthedrums/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/generate-an-account-activation-link-programatically/#post-18171852)
 * Status: resolved