Configure the sending of transactional email
In this article we detail the technical connection details to establish the SMTP sending service , but if you want a non-technical explanation about transactional emails with examples and good practices, take a look at our guide .
Using Acumbamail as an SMTP gateway will allow you to use our servers to efficiently deliver transactional emails generated by your web platform to your users. In addition, Acumbamail will provide you with statistics that will allow you to understand the behavior of your users towards these emails. This type of service can only be used with email rates based on the number of emails or prepaid credit packages and not with rates based on the number of subscribers.
To sign up for this service, you will first need to have a plan subscription for the number of email sends or a prepaid credit package, and then contact our support team to enable the service immediately.
The use of this service is only permitted for sending transactional emails. These emails are registration confirmations, personalized notifications to the user and, ultimately, any email that is the result of a direct interaction between the user and your web platform. Promotional emails can be sent using our newsletters sending tool, the prices of which can be viewed here.
In this article:
Connection data
To use the SMTP server you have to choose the authentication type, you can choose a plain port or TLS/SSL. To use our SMTP server you must use the following connection data:
Host | smtp.acumbamail.com |
Standard ports (plain/StartTLS) | 25252, 587 o 25 |
Puerto con TLS/SSL | 2525 and 465 |
User | Your Acumbamail user email |
Password |
Your Acumbamail password or your auth token
|
To begin the configuration, go to the SMTP section within the left side menu of Acumbamail:
- In Configure , click on the Configure SMTP button and you will be able to access the connection data you need for the integration:
Configuration examples in different languages
Django configuration example
To send emails via Acumbamail using Django's send_mail function, you'll only need to include the following parameters in your configuration (usually in settings.py). Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that apply to you.
# settings.py EMAIL_HOST = 'smtp.acumbamail.com' EMAIL_HOST_USER = 'LOGIN_ACUMBAMAIL' EMAIL_HOST_PASSWORD = 'PASSWORD_ACUMBAMAIL' EMAIL_PORT = 25 #alternative port: 25252 # send_mail call example send_mail("Subject", "Body", "example@mailfrom.com" , "example@mailto.com", fail_silently=True)
Configuration example in Java
To send emails through our SMTP server using the Java programming language, you can do so by following this example. Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that apply to you.
import javax.mail.*; import javax.mail.internet.*; import javax.mail.Authenticator; import javax.mail.PasswordAuthentication; import java.util.Properties; public class test1 { private static final String SMTP_HOST_NAME = "smtp.acumbamail.com"; private static final String SMTP_AUTH_USER = "LOGIN_ACUMBAMAIL"; private static final String SMTP_AUTH_PWD = "PASSWORD_ACUMBAMAIL"; public static void main(String[] args) throws Exception{ new test1().test(); } public void test() throws Exception{ Properties props = new Properties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.host", SMTP_HOST_NAME); props.put("mail.smtp.port", 25); props.put("mail.smtp.auth", "true"); //props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); Authenticator auth = new SMTPAuthenticator(); Session mailSession = Session.getDefaultInstance(props, auth); // uncomment for debugging infos to stdout // mailSession.setDebug(true); Transport transport = mailSession.getTransport(); MimeMessage message = new MimeMessage(mailSession); Multipart multipart = new MimeMultipart("alternative"); BodyPart part1 = new MimeBodyPart(); part1.setText("Test"); BodyPart part2 = new MimeBodyPart(); part2.setContent("Test", "text/html; charset=\"utf-8\""); multipart.addBodyPart(part1); multipart.addBodyPart(part2); message.setHeader("Content-Type","text/html; charset=\"utf-8\""); message.setContent(multipart,"text/alternative"); message.setHeader("Content-Transfer-Encoding", "8bit"); message.setFrom(new InternetAddress("EMAILFROM@EXAMPLE.COM")); message.setSubject("E desde java ;)"); message.addRecipient(Message.RecipientType.TO,new InternetAddress("EMAIL_TO1@EXAMPLE.COM")); //message.addRecipient(Message.RecipientType.CC, new InternetAddress("EMAIL_TO2@EXAMPLE.COM")); transport.connect(); transport.sendMessage(message, message.getRecipients(Message.RecipientType.TO)); transport.close(); } private class SMTPAuthenticator extends javax.mail.Authenticator { public PasswordAuthentication getPasswordAuthentication() { String username = SMTP_AUTH_USER; String password = SMTP_AUTH_PWD; return new PasswordAuthentication(username, password); } } }
Configuration example in PHP
To send emails through our SMTP server using the PHP programming language, you can do so by following this example. Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that apply to you.
require_once 'class.phpmailer.php'; require_once 'class.smtp.php'; $mail = new PHPMailer(); // Limpiamos todos los valores que se pueden establecer $mail->ClearAddresses(); $mail->ClearAllRecipients(); $mail->ClearAttachments(); $mail->ClearBCCs(); $mail->ClearCCs(); $mail->ClearCustomHeaders(); $mail->ClearReplyTos(); // Datos SMTP $mail->SMTPAuth = true; $mail->IsSMTP(); $mail->Host = 'smtp.acumbamail.com'; $mail->Username = 'LOGIN_ACUMBAMAIL'; $mail->Password = 'PASSWORD_ACUMBAMAIL'; $mail->From = 'example@mailfrom.com' $mail->FromName = 'Example from name'; $mail->AddReplyTo('example@mailfrom.com'); $mail->AddAddress('example@mailto.com'); $mail->Subject = G_General::convertCharset("Subject", $charset); $mail->CharSet = strtolower($charset); if ($html) { $mail->MsgHTML(G_General::convertCharset('Body', $charset)); $mail->AltBody = ''; } else { //$mail->ContentType = 'text/plain'; $mail->IsHTML(false); // send as Text $mail->Body = strip_tags(G_General::convertCharset('Body', $charset)); } if (isset($data['debug']) && $data['debug']) { $mail->SMTPDebug = 2; $mail->Debugoutput = 'html'; } if (preg_match('#(,|;)#', $data['to'])) { $emails = preg_split('#(,|;)#', $data['to']); $res = true; foreach ($emails as $k => $email) { $email = trim($email); $mail->ClearAddresses(); $mail->AddAddress($data['to']); if (!$mail->Send()) { $res = false; } } } else { return $mail->Send(); } return $res;
Once you have configured SMTP sending, we recommend that you create email categories to be able to classify the volume of emails sent and to be able to analyze their performance individually . We explain how to do this with examples in different languages in this article .
Enable webhooks for transactional email
From the Webhooks section within SMTP in the side menu, you can configure webhooks for transactional email to synchronize your database with Acumbamail and thus receive alerts when there are changes. Access the step-by-step instructions at this link .
Sending emails
Just like with the newsletters sending method from the Acumbamail interface, you can also use our drag & drop editor for transactional emails, with which you can customize more than 260 predetermined templates to your liking.
The steps to edit your transactional email are as follows:
- Within SMTP, go to the Templates section. By default, the templates you have already been modifying will appear in the Newsletters section if you also use this service. You can directly modify one you have already used or, alternatively, click on the New Template button above .
- Once you click, you will have two options:
- Edit one of our 260+ custom templates to your liking . In the drop-down menu on the right you can see the default notification templates, which may be the ones that best fit your needs in this case. When you select one, you can give it a name and access the template editor ( in this article we explain how the editor works ).
- Import your own HTML template by clicking on the Import tab . You can find more information about importing templates in this article .
SMTP Reports
When you start sending your transactional emails, all the information will go through us, so you can access detailed statistics in real time from the Reports section within SMTP . Below, we explain what data you can extract from here:
Summary
In this view you can select the date range to compare your results:
Status of sent emails:
- Unopened : subscribers (receiver emails) who have not opened your email
- Opened : subscribers who have opened your email
- Hard bounces: emails that have failed to send because they do not exist (typically because the address has a typo or the email no longer exists). Once these emails are marked as hard bounces, you will automatically stop sending them in future mailings.
- Soft bounces: emails that have failed to deliver on a one-time basis. When a soft bounce occurs, the server will make one (or more) subsequent delivery attempts, usually after the rest of the campaign has been sent successfully. Just because an email address is a soft bounce in a particular delivery does not mean that it will always appear as a bounce in subsequent deliveries.
- Complaints : Times when the person who received your email has manually marked it as spam. You will no longer automatically send emails to this email address.
You can find more information about email marketing metrics in this article on our blog .
URL Tracking
In this section you can keep track of all the URLs you have included in your transactional emails.
Subscriber details
From Subscriber Details you can access an email-by-email view of the status of the emails delivered on the date you select. You can filter recipients by status (not opened, opened, hard bounce, soft bounce, complaint or all), by date or by category. In addition, you can download the report by clicking the "Export to csv" button.