Limit on sending hMailServer per day

I want to set the maximum number of emails sent per day for each mailbox on the hmailserver to avoid spam. I am looking for a problem for this in hmailserver and COM API administration.

+3


source to share


1 answer


I believe that there is no such property in hMailServer. You must define a script event OnAcceptMessage to implement this behavior hMailserve doc | OnAcceptMessage .



For the number of emails sent per day, you must create some kind of counter (database table with username, date and number fields) and get the current number of messages in the body of the OnAcceptMessage function. If the counter for the current user and the current day is reached, then reject the letter with a return code 1 or 2 and a meaningful message. If the counter is less than 0, the email will be sent.

+1


source







All Articles