zebra Posted December 22, 2014 Share Posted December 22, 2014 Hi all. Is it possible to add an automatic hidden .btag.it after every clients email - both the clients profile and contacts if any. So it looks like name@domain.com.btag.it The client won't be able to see the hidden tag. Thank you so much and a merry christmas to you all 0 Quote Link to comment Share on other sites More sharing options...
zebra Posted December 28, 2014 Author Share Posted December 28, 2014 I know it's christmas... but doesn't anybody have a little clue about this? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 29, 2014 Share Posted December 29, 2014 Where this tag should be placed? Is it in the body (aka the message) of the email? If it's so, yes it's possible. 0 Quote Link to comment Share on other sites More sharing options...
zebra Posted December 29, 2014 Author Share Posted December 29, 2014 No not in the body, it's right after the email address. All emails send from whmcs, should append .btag.it to the end of the email, so that it reads name@domain.com.btag.it – that’s it! So when I send invoices, reminders and so on, I will be able to track it... I can see when the client has opened the email and if they have clicked a link within the email - See more here: http://bananatag.com/email-tracking/mobile/ 0 Quote Link to comment Share on other sites More sharing options...
zebra Posted January 3, 2015 Author Share Posted January 3, 2015 so nobody knows? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 3, 2015 Share Posted January 3, 2015 If it was in the body you could use this hook point but since it's in the mail address I don't think that it's possible to use this hook. I've no idea. 0 Quote Link to comment Share on other sites More sharing options...
AdyMaunder Posted January 3, 2015 Share Posted January 3, 2015 just set your system email address with the new .btag.it at the end? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted January 3, 2015 Share Posted January 3, 2015 just set your system email address with the new .btag.it at the end? i think it depend on how the BananaTag works as the .btag is supported by most of email clients, so the question is "if you added .btag to system address you will get the correct analytics?" i think it worth to give it a try as i don't see any other way till the moment 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 4, 2015 Share Posted January 4, 2015 just set your system email address with the new .btag.it at the end? I was thinking that too, but I think the OP was looking for a way to use btag without the end user knowing.. and changing the system email address would change the login, so clients would have to be informed... what you could probably do (in theory!) is do as Ady suggests and modify the system email addresses in the database to add .btag.it to them all - all outgoing emails should then use the btag service without the need for additional hooks. however, if you wanted the clients to still use their own email address for logging in, you would need to make modifications to the templates... 1. modify the login form to add '.btag.it' to the username (system email) before/on submitting - I guess you could use javascript/jquery for that... 2. modify the order form to add '.btag.it' to the email when creating a new account - assume code would be similar to above... 3. modify contacts pages in client area so that if client adds a contact, it adds '.btag.it' to the email address... 4. modify displays of the system email address in the client area (e.g client homepage)... that should just be a very simple Smarty replace to remove the '.btag.it' part. 5. possible modification to any system emails mentioned in the body of the email templates - again, that will be the above Smarty replace. there may be other steps I haven't thought of... 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted January 4, 2015 Share Posted January 4, 2015 @brain! he will need to do modification to the whole template, yes. I have a simple modification (one modification) that can make this work as the OP need, @zebra: 1) open this file with any editor (i.e NotePad++), WHMCS/includes/classes/PHPMailer/class.phpmailer.php 2) search for this "function addAddress" approximately at line #701 and it looks like this: public function addAddress($address, $name = '') { return $this->addAnAddress('to', $address, $name); } you need to replace it, so it will look like this: public function addAddress($address, $name = '') { $findBTag = strpos($address, ".btag.it"); if ($findBTag===false){ $address = $address . '.btag.it'; } return $this->addAnAddress('to', $address, $name); } this way it should change all recipient email address from xyz@example.com to xyz@example.com.btag.it this will work 100%, and you will not have to do any hard modifications you need to try it and tell us what you get!! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 5, 2015 Share Posted January 5, 2015 @sentq - if it works, nice solution - that never occurred to me! 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.