Security
Email Sending Limits
Prevent users from maliciously spamming emails, with a free quota of 100 emails per day.
Introduction
To prevent abuse and ensure service stability, we have implemented email sending limits:
Daily Limits
- Free tier: 100 emails per day
- This limit helps prevent:
- Email spam
- Server overload
- Service abuse
Implementation
The system tracks:
- Number of emails sent per user
- Daily reset of counters
- Failed attempts
Rate Limiting
// Example rate limiting implementation
const DAILY_LIMIT = 100;
const RATE_WINDOW = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
async function checkEmailLimit(userId: string): Promise<boolean> {
const count = await getEmailCount(userId);
return count < DAILY_LIMIT;
}
Error Handling
When limits are exceeded:
- User receives clear error message
- Suggestion to wait until next reset
- Option to upgrade for higher limits
Monitoring
We monitor:
- Overall email sending patterns
- Abuse attempts
- System performance
This helps maintain service quality and prevent misuse.
end