In this article, we’ll explore how to configure the mail settings in Smart Report Maker. The system sends two types of emails: administrative emails (like password resets and user invitations) and scheduled reports sent periodically to users. To ensure these emails function correctly, it’s crucial to set up a valid SMTP server.
If you’re using cPanel, refer to this article for step-by-step instructions on accessing your email settings, including outgoing email configuration details.
1. SMTP Server Configuration
Smart Report Maker requires an SMTP server to send emails. During installation, the owner is prompted to provide SMTP details. However, if this step is skipped, SMTP-related operations (like sending invitations or scheduling reports) will trigger SMTP errors until a valid server is configured. This affects both admin actions (like sending invitations) and user requests (such as password resets).
How to Configure the SMTP Server:
- Go to Settings → General.
- In the SMTP Server section, enter the following details,
- SMTP Address:
- This is the outgoing mail server address, typically in the format
smtp.yourdomain.com
. It allows your email client or system to connect to the server to send emails.
- This is the outgoing mail server address, typically in the format
- SMTP Port: Defines the communication channel for the email server. Common ports include:
- 587: Standard port for secure email submission (STARTTLS).
- 465: Used for SSL-encrypted emails.
- 25: Default SMTP port but often blocked by ISPs to reduce spam.
- SMTP Username and Password:
- Use the full email address and its password.
- Use the full email address and its password.
- Encryption Mode: Protects your email transmission from being intercepted:
- None: No encryption.
- SSL/TLS: Secures communication from the start of the connection.
- STARTTLS: Upgrades an unencrypted connection to encrypted mid-session.
- Authentication Mode: Ensures that only authorized users can send emails through the SMTP server:
- Plain: Sends credentials in plain text (not recommended without encryption).
- Login: Basic authentication, requiring a username and password.
- OAuth2: Uses tokens for secure, modern authentication.
3. Test the SMTP Connection:
- After entering the details, test the connection to ensure everything is working.
- If the connection succeeds, the SMTP server will be saved. If an SMTP server is already configured, the system will notify you since Smart Report Maker only supports one SMTP server.
2. Mail Settings
Several email settings can be customized to control the sender information and email formatting:
- From Name and Email:
- This is the name and email address that will appear as the sender in all emails.
- Email Signature:
- The signature added to all outgoing emails from the system.
These settings can be managed from:
Settings → General → General Settings Form.
3. Recurring Email Settings
Smart Report Maker supports recurring emails, typically used for scheduled tasks such as sending reports at set intervals (hourly, daily, weekly, etc.). To ensure these emails function correctly, follow these steps:
Ensure Time Zone is Set Correctly:
- The system’s time zone must be correctly configured to align with the email schedules.
- The time zone is set during installation but can also be adjusted from:
Settings → General → General Settings.
Ensure the Cron Job is Running:
- Scheduled tasks require a cron job to trigger email sending at the configured intervals.
If Docker installation is used, the installer script will automatically configure the cron job. - For cPanel or Composer installations, the installation script typically adds the cron job. However, in rare cases, permissions may prevent it from being created, resulting in a warning (but not an error).
How to Verify the Cron Job:
- Go to Settings → General → General Settings.
- In the Needed Cron Job field, you will find the full command the cron job should run.
- Verify that the cron job is running every minute to ensure scheduled emails are sent correctly.
Conclusion
Setting up the mail system in Smart Report Maker is essential for ensuring smooth communication through both administrative and recurring emails. Start by configuring a valid SMTP server, customize the sender details and signature, and verify that the time zone and cron job are correctly set. With these settings in place, Smart Report Maker can efficiently send scheduled reports and respond to user actions.