Mail Settings
Read this first
AbanteCart sends mail through PHP's built-in mail() function by default, using the Inner Mailer transport. On hosting that is correctly configured to send email, no further setup is required and the rest of this page is optional.
The other transport options on this page (SMTP, system/config DSN, and Mail API extensions) exist for the case where your hosting blocks, limits, or misconfigures PHP's mail sending. When that happens, AbanteCart gives you several ways to route mail through an external provider instead, so you do not have to switch hosting to recover email delivery.
AbanteCart is not a mail server software. It uses whatever mail transport the hosting environment makes available. If email is not being delivered, the cause is almost always a hosting or server configuration issue, not AbanteCart itself. Contact your hosting provider first to confirm that the server can send mail and how. If the host cannot help, pick the alternative on this page that fits your environment and your email provider.
Alert Mail
Send an email to the store owner when a new order is created.
Additional Alert E-Mails
Any additional emails you want to receive the alert email, in addition to the main store email. (comma separated)
Choosing the Right Mail Protocol
When configuring email settings in AbanteCart, you'll need to select the appropriate mail protocol. This decision impacts how your store sends emails, such as order confirmations, registration, and password reset emails.
Mail:
Uses PHP's built-in mail() function.
Simpler setup: Generally, no need to configure if your server allows it.
Reliability: Can be less reliable than SMTP, especially on shared hosting environments.
Consult your web host: Check with your web host if they allow and support the
mail()function on their php servers.
SMTP (Simple Mail Transfer Protocol):
More reliable and flexible: Offers better deliverability rates and more advanced features.
Requires server configuration: You'll need to provide SMTP server details (host, port, username, password).
Popular choices: Gmail, Outlook, dedicated SMTP servers.
Consult your email provider: Refer to your email provider's documentation for the correct SMTP server settings.
System Config: This refers to configuring email settings directly within your
config.phpfile. This approach offers flexibility and can be useful in certain scenarios.Mail API Extensions:
For third-party API mail providers that ship as installable AbanteCart extensions.
No SMTP details required. The extension talks to the provider's HTTP API directly using credentials configured on the extension's own page.
Pluggable. Any installed and enabled Mail API extension appears automatically in the Mail Transporting dropdown as an additional option.
The common issue arises when users copy and paste the SMTP password (or App password for Gmail), inadvertently including leading or trailing spaces. Incorrect passwords often result in generic error messages, making it difficult to pinpoint the exact cause of the issue.
Also, please make sure the /task.php file in your site root has permission 0644.
Mail Protocol: Inner Mailer
If you're unsure about your server's SMTP settings or prefer a simpler setup (and your server allows it).
The Inner Mailer option in AbanteCart utilizes PHP's built-in mail() function to send emails from your store. Here's a breakdown of its key characteristics and considerations:
Functionality:
Leverages your server's configured mail sending program (typically sendmail or postfix).
Relies on settings defined in your server's
php.inifile (specifically thesendmail_pathsetting).
Mail function behaves entirely differently between servers and has limitations on shared hostings.
Can be less reliable than SMTP, especially on shared hosting environments. Each shared hosting companies have its own spam filters and blocking rules. If you want to use PHP mail, you need to make sure that your server can send emails and it is configured properly. In the background, this can be sendmail, postfix, or anything else that your server is set up with. Please contact your hosting if the mail does not work correctly.
If you encounter issues with Inner Mailer, consult your web hosting provider. They can confirm server configuration and troubleshoot any mail sending problems.
Mail Protocol: SMTP
The SMTP (Simple Mail Transfer Protocol) protocol is an alternative method for sending emails in AbanteCart. It involves using a dedicated email server (typically provided by your email provider) instead of your web hosting server's built-in mail functionality.
Please refer to your SMTP server documentation in order to setup SMTP correctly!
SMTP Host: Enter the hostname or IP address of your SMTP server (provided by your email provider).
SMTP Username: Enter the full email address of the account you created for sending emails (e.g., username@yourdomain.com).
SMTP Password: type the password of the same email account or app password, in case you use Gmail (do not use gmail account password). Make sure your mail password contains only UTF-8 characters.
SMTP Port: The most common ports for SMTP are 25, 465 (SSL/TLS), and 587 (TLS). Consult your email provider's documentation for the correct port.
SMTP Timeout: This value (default 5 seconds) specifies the maximum time to wait for a response from the SMTP server. You might need to increase this if your server experiences delays.
Shared Hosting Limits: Be mindful of any limitations on the number of emails you can send through your shared hosting provider's SMTP server.
Note that RFC standards require that the "From" address and the actual email address from which the mail is sent be identical, so we strongly recommend that you have one and the same email address set in both the "SMTP Parameters" section and in the Store Details settings
Example of Gmail SMTP
From May 30, 2022, Google no longer supports the use of third-party apps or devices that ask you to sign in to your Google Account using only your username and password. Follow the Google documentation and create an APP password
To use Gmail with SMTP in AbanteCart, you must:
Create an App Password:
In your Google Account, go to Security -> App passwords.
Click Select app.
Choose "Other (Custom name)" and give it a descriptive name (e.g., "AbanteCart").
Click Select device and choose "Other (Custom name)".
Click Generate.
Copy the generated 16-character app password. Do not share this password with anyone.
Configure AbanteCart SMTP Settings:
SMTP Host: ssl://smtp.gmail.com
SMTP Port: 465 (for SSL)
SMTP Username: Your full Gmail address (e.g.,
your_email@gmail.com)SMTP Password: Use the generated App Password, not your regular Gmail password (without whitespaces). See the App Password format warning below.
App Password format: enter it as plain 16 characters
Google displays the generated App Password in a visual format with separators for readability, typically four groups of four lowercase letters separated by spaces (for example, abcd efgh ijkl mnop). Some interfaces may show the separator as a dash or hyphen instead. Those spaces and dashes are not part of the password; they are only there to make it easier to read.
When you paste the App Password into AbanteCart's SMTP Password field, enter it as a single continuous 16-character string of letters, with no spaces, no dashes, and no other separator characters. Authentication will silently fail if any separator is included.
Key Points:
App Password Security: Treat your App Password like a regular password. Do not share it with anyone.
Revoke App Passwords: If you suspect your App Password has been compromised, revoke it and generate a new one.
Test Email Sending: After configuring SMTP, send a test email to ensure it's being delivered correctly.
By following these steps and using the generated App Password, you can securely configure Gmail as your SMTP server within AbanteCart.
Mail Protocol: system/config
Advanced Users: This method is generally more suitable for users with experience in PHP and server configuration.
the new email library is included with AbanteCart, helping connect to different mail transports (3rd Party Transport). This refers to configuring email settings directly within your /system/config.php file. This approach offers flexibility and can be useful in certain scenarios.
secure config file!
Please set secure config.php permissions after you complete file editing. Usually, it is 644 or 640 permission or more strict permission.
Here are a few examples of the configurations you need to add to your system/config.php file. To work with other mail transports, please follow symphony guides.
Google Gmail SMTP example
GMAIL example
const MAILER = [
//'dsn' => null,
// OR
'protocol' => 'smtp', // or ses+smtp, gmail+smtp, mandrill+smtp, mailgun+smtp, mailjet+smtp, postmark+smtp, sendgrid+smtp, sendinblue+smtp, ohmysmtp+smtp
//we use "username" also as ID, KEY, API_TOKEN, ACCESS_KEY
'username' => 'username@gmail.com',
'password' => 'your_gmail_app_password_without_spaces',
'host' => 'smtp.gmail.com',
'port' => 465
];Gmail password
From May 30, 2022, Google no longer supports the use of third-party apps or devices that ask you to sign in to your Google Account using only your username and password. Follow the Google documentation and create an APP password
Amazon SES is an email platform that provides an easy, cost-effective way for you to send and receive email using your own email addresses and domains. Make sure to set sending permission in the Amazon SES dashboard
Amazon SES example
const MAILER = [
//'dsn' => null,
// OR
'protocol' => 'ses+smtp', // or ses+smtp, gmail+smtp, mandrill+smtp, mailgun+smtp, mailjet+smtp, postmark+smtp, sendgrid+smtp, sendinblue+smtp, ohmysmtp+smtp
//we use "username" also as ID, KEY, API_TOKEN, ACCESS_KEY
'username' => 'ATIA6H2YCK2CFSJX7M', //your SMTP key
'password' => 'kUMmlg4fdfghfgOA54C', //your SMTP password
'host' => 'email-smtp.eu-west-2.amazonaws.com', //your SMTP endpoint
'port' => 465 //or 587 etc
];
Mailchimp transactional email
Delivery API, or application programming interface, that can deliver transactional emails to customers.
Every Mailchimp Transactional account has a reputation and hourly quota and understanding how reputation works is key to ensuring the high deliverability of your messages.
To generate an API key navigate to the Settings of your Mailchimp Transactional account (Mandrill app) and look for the API Keys section
Mailchimp Transactional example
const MAILER = [
//'dsn' => null,
// OR
'protocol' => 'mandrill+smtp', // or ses+smtp, gmail+smtp, mandrill+smtp, mailgun+smtp, mailjet+smtp, postmark+smtp, sendgrid+smtp, sendinblue+smtp, ohmysmtp+smtp
//we use "username" also as ID, KEY, API_TOKEN, ACCESS_KEY
'username' => 'any_username_will_work', // Any string (Mailchimp recommends using the primary contact email on your Mailchimp account)
'password' => 'mandrillapp_API_KEY', // Any valid Mailchimp Transactional API key
'host' => 'smtp.mandrillapp.com', //your mandrill SMTP endpoint
'port' => 587
];To increase the timeout, please change the default_socket_timeout in your php.ini
Mail Protocol: Mail API Extensions
AbanteCart can also send mail through a third-party API provider using an installable Mail API extensions. This route does not use SMTP. The extension talks to its provider's HTTP API using credentials configured on the extension's own page, and registers itself as a transport that appears in the Mail Transporting dropdown.
To use it:
Install a Mail API extension from the AbanteCart Marketplace. The extension must be registered in the MailApi category.
Enable the extension and configure its credentials on its own settings page in Extensions → All extensions.
Go to System → Settings → Mail. The installed and enabled extension appears as an additional option in the Mail Transporting dropdown.
Select it and save. AbanteCart will then send mail through that extension instead of using PHP mail, SMTP, or the system/config DSN.
The SMTP fields on the Mail page do not apply when a Mail API extension is selected. All delivery details are handled on the extension's own configuration page.
For developers: a Mail API extension is any AbanteCart extension whose class implements the contracts\MailApi interface and that is registered with the extension category MailApi. Once installed and enabled, AbanteCart picks it up automatically and lists it in the Mail Transporting dropdown using the name returned by the driver's getName() method.