Basheer Posted July 31, 2017 Share Posted July 31, 2017 Hi, Is there any hook before sending password reset mail from admin side. I want to change email template for particular customers. Thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 31, 2017 Share Posted July 31, 2017 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). 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted August 1, 2017 Author Share Posted August 1, 2017 okay its clear . Is there any option to set/change email template file through script before email send? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 1, 2017 Share Posted August 1, 2017 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. 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted August 1, 2017 Author Share Posted August 1, 2017 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'] 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 1, 2017 Share Posted August 1, 2017 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 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted August 1, 2017 Author Share Posted August 1, 2017 you can apply Brian's approach in "Email Header" as well. But in my email template no header section .. Header is set up only in settings tab. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 1, 2017 Share Posted August 1, 2017 But in my email template no header section .. Header is set up only in settings tab. that's what I meant, you can apply the same in Setup -> General Settings -> Global Email Header/Footer, it should work 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted August 2, 2017 Author Share Posted August 2, 2017 that's what I meant, you can apply the same in Setup -> General Settings -> Global Email Header/Footer, it should work ohh, Okay. Thank you... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.