Содержание

SMTP gate

What is an SMTP gate

SMTP-gate is a way to send us jobs to send emails via the SMTP protocol. The difference between API and SMTP is the data transfer protocol used: SMTP or HTTP protocol. With the SMTP protocol, a sequence of commands is used to send to the server.

Authorisation and sending a message

The enKod authentication is done using SMTP keys. Obtain an SMTP key from your personal SMTP manager to use the SMTP gateway.

Connect to the SMTP server at address: smtpgateway.enkod.ru:587

Use the following command sequence:

Example of a request to send via openssl

<ignore>

s_client -starttls smtp -connect smtpgateway.enkod.ru:587
ehlo testmail.ru
auth plain AABfN3lhTUZtcm5hZ251VFRXR1lueVNiQWNLX2R4VTh4WWWVYdzV2UzBYXVpMQ==
mail from:[email protected]
rcpt to:[email protected]
data
Date: Thu, 29 Sep 2022 15:42:13 GMT
From: [email protected]
To: [email protected]
Subject: subject
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" style="font-family:'open sans', 'helvetica neue', helvetica, arial, sans-serif">
<head>
<meta charset="UTF-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta name="x-apple-disable-message-reformatting"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="telephone=no" name="format-detection"/>
<title>title</title><ignore><!--[if (mso 16)]></ignore>
<ignore><style type<ignore>=</ignore>"text/css"></ignore>
a {text-decoration: none;}
<ignore></head></ignore>
<ignore><html></ignore>
<ignore><body></ignore>
message body
<ignore></body></ignore>
<ignore></html></ignore>
<ignore>

</ignore></ignore></ignore>

<ignore>=====</ignore> Possible errors <ignore>=====</ignore>