Ctrl K
ring2all.com

Email Settings Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Are Email Settings?

Email Settings is an SMTP configuration module that manages outgoing email server profiles. It supports multiple SMTP configurations with authentication, encryption (SSL/TLS), and includes test functionality and email delivery logs.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Email Settings Architecture                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Email Configuration Profiles                                   │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Profile: Company SMTP                             │   │
│  │                                                          │   │
│  │  Basic Settings:                                         │   │
│  │  ├─ Host: smtp.company.com                              │   │
│  │  ├─ Port: 587                                           │   │
│  │  └─ TLS: Enabled                                        │   │
│  │                                                          │   │
│  │  Authentication:                                         │   │
│  │  ├─ Method: Login                                       │   │
│  │  ├─ Username: noreply@company.com                       │   │
│  │  └─ Password: ********                                  │   │
│  │                                                          │   │
│  │  Email Settings:                                         │   │
│  │  ├─ From Email: noreply@company.com                     │   │
│  │  ├─ From Name: Company PBX                              │   │
│  │  └─ Reply To: support@company.com                       │   │
│  │                                                          │   │
│  │  Status: ✓ Active, ⭐ Default                           │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Used by system                                         │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Email Sender Service                              │   │
│  │                                                          │   │
│  │  Sends emails for:                                       │   │
│  │  ├─ Voicemail notifications                             │   │
│  │  ├─ Fax-to-email                                        │   │
│  │  ├─ System alerts                                       │   │
│  │  ├─ Password resets                                     │   │
│  │  └─ User notifications                                  │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Logged                                                 │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Email Logs                                        │   │
│  │                                                          │   │
│  │  ├─ Pending                                             │   │
│  │  ├─ Sent                                                │   │
│  │  ├─ Failed                                              │   │
│  │  └─ Bounced                                             │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.email_settingsSMTP configurations
public.email_logsEmail delivery history

Key Files

FileDescription
modules/emailSettings/Frontend module
---

2. Module Overview (Commercial/Business)

Business Value

Email Settings provides reliable email delivery:

Without Email SettingsWith Email Settings
No notificationsEmail alerts
No voicemail emailVM to email
No fax deliveryFax to email
Unknown statusDelivery logs

Use Cases

  1. Voicemail Notifications
- Email new voicemails

- Audio attachments

  1. System Alerts
- Storage warnings

- CPU alerts

- Security notifications

  1. Fax to Email
- Receive faxes as PDF

- Email delivery

  1. User Notifications
- Password resets

- Account alerts

Feature Highlights

FeatureBenefit
Multiple ProfilesDifferent SMTP servers
SSL/TLSSecure transmission
AuthenticationLogin, Plain, OAuth2
Test FunctionVerify before use
Email LogsDelivery tracking
Default ProfileFallback configuration
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Create SMTP server configurations
  • Set encryption (SSL/TLS)
  • Configure authentication
  • Set sender information
  • Test email delivery
  • View email logs
  • Set default profile

Email Settings Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Email Settings                                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Configure email server settings for system notifications      │
│                                                                 │
│  [+ Add Configuration]                                          │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Profile Name    │ Host              │ Status   │ Default │  │
│  ├─────────────────┼───────────────────┼──────────┼─────────┤  │
│  │ Gmail SMTP      │ smtp.gmail.com    │ ● Active │ ⭐      │  │
│  │ SendGrid        │ smtp.sendgrid.net │ ● Active │         │  │
│  │ Office365       │ smtp.office365.com│ ○ Inactive│        │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  [📋 View Logs]                                                 │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Add/Edit Configuration

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Edit Configuration: Gmail SMTP                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ▼ Basic Settings                                               │
│                                                                 │
│  Profile Name: [Gmail SMTP                   ]                 │
│    Friendly name for this email configuration                   │
│                                                                 │
│  SMTP Host: [smtp.gmail.com                  ]                 │
│    SMTP server hostname or IP address                           │
│                                                                 │
│  Port: [587                                  ]                 │
│    587 for TLS, 465 for SSL, 25 for plain                       │
│                                                                 │
│  Use SSL Encryption: ☐                                         │
│    Use SSL encryption (port 465)                                │
│                                                                 │
│  Use TLS: ✓                                                    │
│    Use STARTTLS encryption (port 587)                           │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  ▼ Authentication                                               │
│                                                                 │
│  Auth Method: [Login ▼]                                        │
│    None | Login | Plain | OAuth2                                │
│                                                                 │
│  Username: [noreply@company.com              ]                 │
│    Account username or email address                            │
│                                                                 │
│  Password: [••••••••••••••••                 ]                 │
│    Password or app-specific password                            │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  ▼ Email Settings                                               │
│                                                                 │
│  From Email: [noreply@company.com            ]                 │
│    The email address that appears as sender                     │
│                                                                 │
│  From Name: [Company PBX                     ]                 │
│    The name displayed as the sender                             │
│                                                                 │
│  Reply To: [support@company.com              ]                 │
│    Where replies should be directed                             │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  ▼ Advanced Settings                                            │
│                                                                 │
│  Connection Timeout: [60000     ] ms                           │
│  Greeting Timeout: [30000       ] ms                           │
│  Socket Timeout: [60000         ] ms                           │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  ▼ Status Settings                                              │
│                                                                 │
│  Enable Profile: ✓                                             │
│    Enable this configuration for sending emails                 │
│                                                                 │
│  Set as Default: ✓                                             │
│    Use this as the default configuration                        │
│                                                                 │
│  [Test Configuration] [Save] [Cancel]                           │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Test Configuration

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Test Email Configuration                           │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Enter an email address to send a test message                  │
│                                                                 │
│  Test Email Address: [admin@company.com      ]                 │
│                                                                 │
│  [Send Test]                                                    │
│                                                                 │
│  ✓ Test Successful                                             │
│  Test email sent successfully                                   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Email Logs

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Email Logs                                         │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  View email sending history and status                          │
│                                                                 │
│  Filters:                                                       │
│  Status: [All statuses ▼] From: [         ] To: [         ]   │
│                                                                 │
│  [🔍 Search logs...]                                            │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Date       │ To                │ Subject      │ Status   │  │
│  ├────────────┼───────────────────┼──────────────┼──────────┤  │
│  │ 2025-01-16 │ user@company.com  │ New Voicemail│ ● Sent   │  │
│  │ 2025-01-16 │ admin@company.com │ System Alert │ ● Sent   │  │
│  │ 2025-01-15 │ bad@invalid.com   │ Notification │ ✗ Failed │  │
│  │ 2025-01-15 │ user@company.com  │ Fax Received │ ● Sent   │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Test Before Use: Always test configuration before going live.
TIP
App Passwords: Use app-specific passwords for Gmail/Office365.
NOTE
Password Storage: Passwords are stored encrypted.

---

4. Configuration Sections

Basic Settings

FieldDescription
Profile NameIdentifier
SMTP HostServer address
PortSMTP port
Use SSLSSL encryption (465)
Use TLSSTARTTLS (587)

Authentication

FieldDescription
Auth MethodNone, Login, Plain, OAuth2
UsernameLogin username
PasswordLogin password

Email Settings

FieldDescription
From EmailSender address
From NameSender display name
Reply ToReply destination

Advanced Settings

FieldDescription
Connection TimeoutConnect wait (ms)
Greeting TimeoutServer greeting wait (ms)
Socket TimeoutOperation wait (ms)

Status Settings

FieldDescription
Enable ProfileActive/Inactive
Set as DefaultSystem default
---

5. Settings Reference

Common SMTP Servers

ProviderHostPortEncryption
Gmailsmtp.gmail.com587TLS
Office 365smtp.office365.com587TLS
SendGridsmtp.sendgrid.net587TLS
Amazon SESemail-smtp.{region}.amazonaws.com587TLS
Mailgunsmtp.mailgun.org587TLS

Port Guide

PortEncryptionUse Case
25NoneLegacy (not recommended)
465SSLImplicit SSL
587TLSSTARTTLS (recommended)
2525TLSAlternative TLS

Email Log Statuses

StatusMeaning
PendingQueued for delivery
SentSuccessfully delivered
FailedDelivery failed
BouncedRecipient rejected
---

6. Common Scenarios & Examples

Scenario 1: Gmail SMTP

  1. Add Configuration
  2. Name = "Gmail SMTP"
  3. Host = smtp.gmail.com
  4. Port = 587
  5. Enable TLS
  6. Auth = Login
  7. Username = your@gmail.com
  8. Password = App Password (not regular password)
  9. Test and Save

Scenario 2: Office 365

  1. Add Configuration
  2. Name = "Office365"
  3. Host = smtp.office365.com
  4. Port = 587
  5. Enable TLS
  6. Auth = Login
  7. Use Microsoft account credentials
  8. Test and Save

Scenario 3: SendGrid

  1. Add Configuration
  2. Name = "SendGrid"
  3. Host = smtp.sendgrid.net
  4. Port = 587
  5. Enable TLS
  6. Auth = Login
  7. Username = apikey
  8. Password = SendGrid API Key
  9. Test and Save

Scenario 4: Multiple Profiles

  1. Create primary SMTP (Gmail)
  2. Set as Default
  3. Create backup SMTP (SendGrid)
  4. Keep as secondary
  5. Both profiles available

---

7. Limitations & Important Notes

Technical Notes

NOTE
App Passwords: Gmail/Office365 require app-specific passwords.
NOTE
Rate Limits: SMTP providers have sending limits.
WARNING
SPF/DKIM: Configure DNS for best deliverability.

Best Practices

  1. App Passwords: Use for Gmail/Microsoft
  2. TLS: Always use encryption
  3. Test First: Verify before production
  4. Monitor Logs: Check for failures
  5. Backup Profile: Have secondary SMTP

Gmail Requirements

RequirementAction
2FA EnabledEnable two-factor auth
App PasswordGenerate app-specific password
Less Secure AppsNot needed with app passwords
---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Connection timeoutWrong host/portVerify settings
Auth failedWrong credentialsCheck username/password
TLS errorWrong encryptionMatch port to encryption
Test failsFirewall blockingCheck outbound port

Test SMTP Connection

Bash
# Test port connectivity
telnet smtp.gmail.com 587

# Test with OpenSSL
openssl s_client -starttls smtp -connect smtp.gmail.com:587

Check Logs

Sql
SELECT 
  recipient_email,
  subject,
  status,
  error_message,
  sent_at
FROM public.email_logs
ORDER BY sent_at DESC
LIMIT 20;

---

9. Glossary

TermDefinition
SMTPSimple Mail Transfer Protocol
TLSTransport Layer Security
SSLSecure Sockets Layer
STARTTLSTLS upgrade command
App PasswordSingle-use app credential
SPFSender Policy Framework
---

Lua Script Status ℹ️

Configuration Module

ComponentStatus
Email Settingsℹ️ SMTP configuration - no Lua handler required
Email Settings is a configuration module. It manages SMTP server settings. No Lua handlers are used - email sending is handled by the backend notification service.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?