Overview
What is its Purpose?
This Connection enables integration steps running on Apinizer to securely access SMTP servers.
Provides manageability from a single configuration point in warning, alarm, notification, or bulk email scenarios.
Ensures compatibility with different service providers thanks to advanced parameters such as TLS, authentication, and custom SMTP headers.
Reduces repetitive definitions in Development/Test/Production distinctions thanks to environment-based settings.
Working Principle
When SMTP type Connection is requested from within Integration Flow or Connector, the system reads configured connection parameters.
Email Connections work with lightweight sessions opened per request; pool is disabled but worker queues queue concurrent requests.
Authentication is performed with username/password if Auth toggle is on, otherwise with anonymous SMTP access.
MIME messages and additional headers are sent via SMTP with TLS/STARTTLS support.
After the operation is completed, session is closed and worker returns to clean state for new requests.
In case of connection error, timeout, or authentication error, details are written to Apinizer logs, error message and recommended actions are notified to the user.
Usage Areas
Automatic email notifications for system events or monitoring alarms
Secure mailboxes that send verification codes from identity providers
Outgoing communication scenarios with PDF attachments such as invoices, receipts, or reports
Sharing periodic status/health reports via Scheduled Jobs
Technical Features and Capabilities
Basic Features
Upgrades SMTP sessions to TLS with enableStartTls toggle.
When auth is active, username/password becomes mandatory and credential verification is performed.
Sender address to be used in all messages is centrally defined with from field.
Ability to define separate connection parameters for each environment (Development, Test, Production).
Making Connection active or passive (enable/disable toggle). In passive state, connection cannot be used but its configuration is saved.
Advanced Features
Server-specific headers or protocol parameters can be added with additionalProperties.
Verification is performed before actual sending with addressToTest field and Test Mail button.
Saving the connection deploys it to the gateway and worker processes.
Ability to verify connection parameters before saving with "Test Connection" button.
Exporting Connection configuration as ZIP file. Importing to different environments (Development, Test, Production). Version control and backup capability.
Monitoring connection health and performance metrics.
Connection Parameters
Required Parameters
Description: Connection name (must be unique)
Example Value: Production_EmailSMTP
Notes: Should not start with space, special characters should not be used
Description: FQDN/IP information of SMTP server
Example Value: smtp.mailprovider.com
Notes: 255 character limit
Description: SMTP port number
Example Value: 587
Notes: 587 recommended for TLS, 465 for SSL
Description: Sender address to be used in messages
Example Value: noreply@company.com
Notes: Must be valid email format
Description: Body/header character set
Example Value: UTF-8
Notes: Comes as UTF-8 by default in UI
Description: SMTP account username
Example Value: alert.bot
Notes: Required when Auth toggle is on
Description: SMTP account password
Example Value: ••••••
Notes: Required when Auth toggle is on
Optional Parameters
Description: Description field for Connection purpose
Default Value: Empty
Recommended Value: Example: Prod alarm mail channel
Description: Toggle for upgrading to TLS
Default Value: false
Recommended Value: true in environments where TLS is mandatory
Description: Authentication requirement
Default Value: false
Recommended Value: true in most providers
Description: Address where test mail will be sent
Default Value: Empty
Recommended Value: Dev team distribution list
Description: Provider-specific key/value set for SMTP
Default Value: Empty array
Recommended Value: Like mail.smtp.connectiontimeout=15000
Description: Determines whether SSL/TLS is used for SMTP connection Default Value: false Recommended Value: true in production environments
Description: When enabled, the host name in the SMTP server certificate is verified Default Value: false
Description: Certificate selection used when SSL is active Default Value: Empty (system certificates are used) Recommended Value: Relevant certificate should be selected for self-signed servers
Usage Scenarios
Situation: Monitoring system produces critical alarm
Solution: Host=smtp.ops.local, From=alerts@company.com, Auth=true
Expected Behavior: Alarm mail goes to recipient list via TLS
Situation: OTP sent during authentication process
Solution: Port=587, Enable STARTTLS=true
Expected Behavior: OTP message is transmitted within seconds
Situation: Monthly reports with PDF attachments sent
Solution: AdditionalProperties with mail.smtp.writetimeout=120000
Expected Behavior: Large attachments sent without timeout
Situation: Dummy address for test environment scenarios
Solution: Environment=Test, Auth=false, From=test@dummy.local
Expected Behavior: Messages fall to sandbox SMTP
Situation: Secondary activates when primary SMTP is down
Solution: Host=primary, AdditionalProperties.failover=smtp2
Expected Behavior: Second host is used without flow interruption
Connection Configuration
Creating New Email Connection
Configuration Steps
- Click Connection option from left menu on Apinizer main screen.
- Select Email option from opened submenu.
- Email Connection list page opens.
- Click [+ Create] button in top right corner of page.
- New Email Connection creation form opens.
Enable Status (Active Status) Setting:
- Find Enable Status toggle at top of form.
- Set toggle to Active position (comes active by default).
- If you want to make Connection passive, set toggle to Passive position.
- Passive connections cannot be used in Integration Flows but their configurations are saved.
Name (Name) - Required Field:
- Enter a unique connection name in Name field.
- Name examples:
Production_EmailSMTP,Test_EmailConnection,Dev_SMTP_Alerts - Name rules:
- Should not start with space
- Special characters should not be used (recommended: letter, number, underscore)
- Maximum 255 characters
- System automatically checks as you type name:
- Green checkmark: Name is available
- Red X mark: Name already exists, select different name
Description (Description) - Optional:
- Enter text describing the purpose of connection in Description field.
- Example descriptions:
- "SMTP channel for alarms"
- "Production environment email notifications"
- "Dummy SMTP connection for test environment"
- Maximum 1000 character limit exists.
- This field can be left empty.
In the action button area at the top of the page, you can use the [<> Variable] button to select dynamic values, and with global variables, you can manage connection parameters with variable-based values instead of fixed values. For detailed information, review the Dynamic Variables page.
- Find Environment dropdown menu.
- Open dropdown menu and select one of the following options:
- Development: For development environment
- Test: For test environment
- Production: For production environment
- Different connection parameters can be defined for each environment.
- Environment selection determines in which environment connection will be active.
- Connections with same name can be created separately for different environments.
Host (Server Address) - Required:
- Enter SMTP server address in Host field.
- Host format:
- FQDN (Fully Qualified Domain Name):
smtp.mailprovider.com - IP address:
192.168.1.100 - Maximum 255 character limit exists.
- Get correct host address from your SMTP provider's documentation.
Port (Port Number) - Required:
- Enter SMTP port number in Port field.
- Common port numbers:
- 25: Standard SMTP (usually unencrypted)
- 465: SMTP with SSL/TLS (SMTPS)
- 587: SMTP with STARTTLS (recommended)
- Check correct port number from your SMTP provider's documentation.
- Port number must be between 1-65535.
Enable STARTTLS Setting:
- Find Enable STARTTLS toggle.
- If your SMTP provider requires TLS/STARTTLS, set toggle to Active position.
- If using port 587, STARTTLS should generally be active.
- If using port 465, STARTTLS is generally not needed (SSL/TLS is used directly).
- Check provider documentation to make correct setting.
Port 587 and STARTTLS combination is recommended for most modern SMTP providers.
Use SSL Setting:
- Find Use SSL toggle.
- If your SMTP server requires SSL/TLS, set toggle to Active position.
- When SSL is enabled, a certificate can optionally be selected.
- If no certificate is selected, default JVM certificates are used.
- For SMTP servers using self-signed certificates, you can define the relevant certificate in Secrets Management → Certificates and select it here.
From (Sender Address) - Required:
- Enter sender email address in From field.
- Format: Must be valid email address format.
- Examples:
noreply@company.com,alerts@company.com,test@dummy.local - This address will appear as sender in all sent emails.
- Ensure your DNS/SPF records support this address.
Auth (Authentication) Setting:
- Find Auth toggle.
- If your SMTP server requires authentication, set toggle to Active position.
- Most modern SMTP providers require authentication.
Username (Username) - Required when Auth is on:
- If Auth toggle is active, Username field becomes visible.
- Enter username of your SMTP account.
- Examples:
alert.bot,smtp.user,noreply@company.com - In some providers, username may be full email address.
- Check correct format from your SMTP provider's documentation.
Password (Password) - Required when Auth is on:
- If Auth toggle is active, Password field becomes visible.
- Enter password of your SMTP account.
- Password will appear masked for security reasons.
- You can click eye icon to see password.
- Use of secret manager is recommended for sensitive information.
This connector has no dedicated timeout or connection pool field; SMTP-side timeouts can be provided through the Additional Properties section using mail.smtp.* keys (detailed in Step 7).
Additional Properties (Additional Properties) - Optional:
- Find Additional Properties section.
- Use this section to add provider-specific parameters for your SMTP provider.
- Add parameters in Key-Value format:
- Example:
mail.smtp.connectiontimeout=15000 - Example:
mail.smtp.writetimeout=120000 - Commonly used properties:
mail.smtp.connectiontimeout: Connection timeout (milliseconds)mail.smtp.timeout: General timeout (milliseconds)mail.smtp.writetimeout: Write timeout (milliseconds)mail.smtp.auth.mechanisms: Authentication mechanism- Add one key-value pair per line.
- Check supported properties from your SMTP provider's documentation.
AddressToTest (Test Address) - Optional:
- Find AddressToTest field.
- Enter email address to be used for test mail sending.
- This address is where test mail will be sent when Test Connection button is clicked.
- Example:
dev-team@company.com,test@dummy.local - This field can be left empty, but filling it is recommended for testing.
- Find [Test Connection] button at bottom of form or in top right corner.
- Click button.
- System tests connection parameters:
- Connection is established to SMTP server
- Authentication is performed (if Auth is active)
- STARTTLS handshake is performed (if active)
- Test mail is sent (if AddressToTest is filled)
- Test result:
- Successful: Green confirmation message is displayed, message like "Connection test successful"
- Failed: Red error message is displayed, error details are shown
- In error case:
- Read error message
- Check relevant parameters (Host, Port, Username, Password)
- Check firewall and network settings
- Check SMTP provider documentation
- Fix parameters and test again until test is successful.
- Ensure all required fields are filled.
- Verify that test connection is successful (recommended).
- Click [Save and Deploy] button in top right corner of form.
- System saves connection and deploys to selected environment.
- After successful save:
- You are redirected to Connection list page
- New connection appears in list
- Connection becomes Enabled status
- Becomes available for use in Integration Flow and Connector steps
Checklist (Before Saving):
- Name field is unique and valid
- Host and Port fields are filled
- From address is in valid email format
- If Auth is active, Username and Password are filled
- Environment is selected
- Test Connection is successful (recommended)
- All required fields are filled
Result:
- Connection is successfully created and saved
- Becomes active in selected environment
- Connection selection can be made in Integration Flow and Connector steps
- Is displayed and can be managed in Connection list
Connection created successfully! You can now use it in Integration Flow and Connector steps.
Deleting Connection
Select Delete from ⋮ menu at end of row or click [Delete] button on connection detail page
Check Before Deleting: May be used in Integration Flow or Connector steps. Assign alternative connection if necessary. Backup with Export before deleting
Alternative: Deactivate
- Use Disable option instead of deleting.
- Connection becomes passive but is not deleted.
- Can be reactivated when needed.