cheetooh Posted July 2, 2018 Share Posted July 2, 2018 Dear all, I am trying to prevent the invoices email being sent to the profile contact and only send to sub-contacts. Is it possible to achieve with the "EmailPreSend" hook? Thank you! 0 Quote Link to comment Share on other sites More sharing options...
wtools Posted July 5, 2018 Share Posted July 5, 2018 Yes it's possible. Did you try with $merge_fields['abortsend'] = true; ? 0 Quote Link to comment Share on other sites More sharing options...
cheetooh Posted July 5, 2018 Author Share Posted July 5, 2018 Yes I did but they will actually abort all invoices email sending regardless of how many contacts you have. Cannot differentiate between profile contact or sub-contact 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 5, 2018 Share Posted July 5, 2018 1 hour ago, cheetooh said: Yes I did but they will actually abort all invoices email sending regardless of how many contacts you have. I think the implication of the Contacts documentation is that the emails are sent to the client, and are effectively bcc'd to any applicable contacts...i'm not sure if the emails are sent individually to both main account and contacts (if you see what I mean). 2 hours ago, cheetooh said: Cannot differentiate between profile contact or sub-contact you could use the Class docs to see if they're a contact, but if bcc is occurring, then I don't know if doing that gets you any further forward. somewhere in the back of my mind, I can recall a thread where one of the WHMCS guys said that it wasn't possible to disable emails to the main account holder... now that doesn't necessarily mean that it was impossible back then, or still is now, but I can't recall anyone posting code to do it. certainly, there is a 5-year old feature request for this... 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.