Configure the sending of transactional email

In this article we detail the technical connection data 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 when delivering the transactional emails generated by your web platform to your users efficiently. In addition, Acumbamail will provide you with statistics that will allow you to know 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 hire this service, you will first have to have contracted a plan by number of email sends or a package of prepaid credits, and then contact our support team to enable the service at the moment.

The use of this service is only allowed for the sending of transactional emails. These mailings are registration confirmations, personalized notifications to the user and, in short, any email that is the product of a direct interaction of the user with your web platform. Promotional emails can be sent using our newsletter sending tool, the prices of which you can see here.

Connection data

To use the SMTP server you have to choose the type of authentication, you can choose a plain port or with TLS/SSL. In order to use our SMTP server you must use the following connection information:

Host smtp.acumbamail.com
Standard ports (plain/StartTLS) 25252, 587 or 25
TLS/SSL port 2525 and 465
User Your Acumbamail user email
Password
Your Acumbamail password or auth token

To start the configuration, go to the SMTP section within the Acumbamail left side menu:

smtp menu

smtp menu

  • In Configure , click on the Configure SMTP button and you will be able to access the connection data you need for the integration:

configurar smtp relay

configurar smtp relay

Configuration examples in different languages

Configuration example in Django

To send emails through Acumbamail with django's send_mail function, you will only have to include the following parameters in the configuration (usually in settings.py). Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that correspond in your case.

# 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 it by following this example. Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that correspond in your case.

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 it by following this example. Remember to replace LOGIN_ACUMBAMAIL and PASSWORD_ACUMBAMAIL with the ones that correspond in your case.

require_once 'class.phpmailer.php';
     require_once 'class.smtp.php';
     $mail = new PHPMailer();

     // Cleaning all values that can be set
     $mail->ClearAddresses();
     $mail->ClearAllRecipients();
     $mail->ClearAttachments();
     $mail->ClearBCCs();
     $mail->ClearCCs();
     $mail->ClearCustomHeaders();
     $mail->ClearReplyTos();

     // SMTP data
     $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 sending via SMTP, we recommend that you create email categories to be able to classify the volume of emails sent and be able to analyze their performance individually . We explain how to do it with examples in different languages in this article .

Activate 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 in this link .

Sending emails

As in the mode of sending newsletters from the Acumbamail interface, also with transactional emails you can make use of our drag & drop editor with which you can customize to your liking more than 260 predetermined templates.

The steps to edit your transactional email are as follows:

  • Within SMTP, go to the Templates section. By default, the templates that you have already been modifying will appear in the Newsletters section if you also use this service. You can directly modify an already used one or, if not, click on the New Template button above.

transactional email templatestransactional email templates

  • Once you click, you will have two options:
    • Edit to your liking one of our more than 260 custom templates. In the drop-down menu on the right you can see the default templates for notifications, which may be the ones that best suit your needs in this case. When you select one, you can put a name to it and access the template editor(in this article we explain how the editor works).
    • Import your own HTML template by clicking the Import tab . You have more information about importing templates in this article .

SMTP reports

When you start sending your transactional emails, all the information will pass through us, so you can access detailed statistics in real time from the Reports section within SMTP . Next, 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 emails sent:

  • Unopened : subscribers (receiving emails) who have not opened your email
  • Open : subscribers who have opened your email
  • Hard bounces (hard bounces): emails that have failed to send because they do not exist (typically because the address has a mistake or the email has ceased to exist). Once these emails are marked as hard bounce, you will no longer send them automatically in future shipments
  • Soft bounces: emails that have given a punctual sending error. When a soft bounce occurs, the server will make another (or other) subsequent delivery attempts, usually after the rest of the campaign has been successfully sent. The fact that an email address is a soft bounce in a specific shipment does not mean that it will always appear as a bounce in subsequent shipments.
  • Complaints : times when the person who received your shipment has manually marked it as spam. You will no longer automatically send emails to this email address.

transactional emails reports

transactional emails reports

You have more information on email marketing metrics in this article on our blog .


URL tracking

In this section you can keep track of all the URLs that 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 open, open, hard bounce, soft bounce, complaint or all), by date or by category. Additionally, you can download the report by clicking the "Export to csv" button.