Closed qiemem closed 13 years ago
Hi qiemem,
good point but the code is good.
The MAILER_HARD_LIMIT value is returned only if the self.mails_hour is set to 0. If the mails_hours is set to 0 this means that the server has no limit for sending emails, but using 0 will not allow you to send emails, that's why MAILER_HARD_LIMIT is set to a high value.
So the remaining credits are computed only if you set a positive value.
Regards.
When the server defaults to MAILER_HARD_LIMIT, it doesn't look at the emails it's already sent when returning credits(). Thus, if multiple newsletters are sent within an hour that collectively send more than MAILER_HARD_LIMIT, the limit will be exceeded even though none of the newsletters send more than MAILER_HARD_LIMIT individually. I think the SMTPServer.credits() function should read: