ST4R Posted February 29 Share Posted February 29 Hello, I want the emails sent by WHMCS to be discarded and not sent anywhere. I am aware of the "disable global email" feature, but it prevents any emails from being logged, even within the WHMCS internal system. What I specifically want is for emails to be stored in the WHMCS database as usual, but without invoking the mail function in PHP. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted March 1 Share Posted March 1 What messages would you like to be sent? That's to say: what's the rule to decide if a certain message should be sent by email or not? 0 Quote Link to comment Share on other sites More sharing options...
berstein Posted March 5 Share Posted March 5 This might not what you are looking for, but setting the mail SMTP to Mailtrap can still log your email without actually sending to recipient. I haven't check whether cancelling the mail sending using hooks "EmailPreSend" would still log the mail delivery or not. 0 Quote Link to comment Share on other sites More sharing options...
infohills Posted March 11 Share Posted March 11 Instead of invoking the mail() function directly, you'll modify the code to store the email details in the WHMCS database without actually sending them via email. Develop a function that inserts the email details (e.g., recipient, subject, body) into the WHMCS database tables designated for storing email logs. You'll likely need to interact with the WHMCS database using SQL queries. 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.