Jump to content

hook for selecting password reset mail template


Basheer

Recommended Posts

Is there any hook before sending password reset mail from admin side. I want to change email template for particular customers.

I suppose it would be EmailPreSend...

 

but remember that the email templates are using Smarty, so it would be possible for them to generate two different emails based on some condition set by you, e.g let's say you put these customers who you want to receive a different template into a Client Group (let's call it 'particular') and then you can do this in the email template...

 

Dear {$client_name},
{if $client_group_name eq 'particular'}
your custom message to these customers...
{else}
As you requested, your password for our client area has now been reset. Your new login details are as follows:

{$whmcs_link}
Email: {$client_email}
Password: {$client_password}

To change your password to something more memorable, after logging in go to My Details > Change Password.
{/if}

{$signature}

that should be far simpler to do than using a hook (unless you can't determine/assign these customers through existing variables). :idea:

Link to comment
Share on other sites

I can't recall a situation where i've ever had to use a hook to determine which email template to send... :?:

 

occasionally, i've used EmailPreSend to pass variables to the templates and then used those values in the email template to decide the output.

Link to comment
Share on other sites

okay, is it possible to override "Client Email Header Content(which we set on setup->general setting->mail" for a particular mail/user ?

 

actually my requirement is very simple change the logo and company details for a particular clients :)

 

- - - Updated - - -

 

I can't recall a situation where i've ever had to use a hook to determine which email template to send... :?:

 

 

I think we can get the email template name in email presend hook

 

$vars['messagename']

Link to comment
Share on other sites

okay, is it possible to override "Client Email Header Content(which we set on setup->general setting->mail" for a particular mail/user ?

 

actually my requirement is very simple change the logo and company details for a particular clients :)

you can apply Brian's approach in "Email Header" as well.

 

 

I think we can get the email template name in email presend hook

 

$vars['messagename']

you can get it but you can't overwrite/change it

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated