Jump to content

prevent emails from sending


ST4R

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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