Follow

New feature : Daily exports of SMTP streams (exact copy of each html message sent) to insert into your information system

We have just released a new functionality allowing daily exports of SMTP streams, allowing you to upload into your information system, the exact copies of the messages sent.

You will have a dedicated SFTP access where files will be uploaded by our engineers and could be downloaded by you.

Files will be kept 30 days, so you can pick them up either several times a day or in bulk, after several days.

 

FOR « EVENTS » : Single Messages

In order for you to picture better how it works, here’s an example of  a file : It contains all the “events” transmitted between 23:00 and 24:00 on a certain day:

Event_2661_2013-05-01-15-00-00_2013-05-01-16-00-00.rar

  • Event = unitary Messages
  • 2661 = idProject
  • Followed by the start-and-end date of the event inside the file

The archive will contain a series of BSMTP that will have ONLY ONE message each.   

Naming here is simple : Event_idProject_idSendLog.

Smtp-stream-naming.jpg

FOR BATCHES

It’s simplier :

Batch_2661_12345678_1111_2222.rar

  • Batch = Messages in Lot
  • 2661 = idProject
  • 12345678 = idBatch
  • Followed by the first and last « idSendLog » contained in this archive

Note : If the Batch took a long time to produce, (several hours, we’re talking over 1Gb), it is possible that the batch will be cut in several archives.  The naming stated earlier will be respected.  So for the same Batch there will be several RARs that will contain different ranges of IdSendLogs.

EXAMPLE : These archives contain a series of BSMTPs which, in case of batches, include potentially SEVERAL messages:

Smtp-streams-several_batches.jpg

The naming is the same as the RAR : Batch_idProject_idBatch_idSendLog(first)_idSendLog(last)

 

IDSENLOGS are associated with each Message

In case of « Events », it’s not relevant because the name of the file indicates the IdSendLog.

But it’s relevant in cases of Batches when it contains 100 Messages:

Example of the beginning of the file:  

 

XMRG FROM:<k7USxMxEsWqSaAaAaA3DjX2@ofsys.com>

XDFN *parts="1"

XDFN idSendLog=495297710

XDFN *from="k7USxMxEsWqSaAaAaA3DjX2@ofsys.com"

XDFN *jobid="OFC4-2661-495297710"

XDFN *envid="k7USxMxEsWqSaAaAaA3DjX2"

XDFN *vmta="Sapato_Events"

RCPT TO:<infinity.20014@mail.ru>

XPRT 1 LAST

Received: FROM OFSYSSMTP4.hq2.rep ([[fe80::7061:8ff8:aad5:1f7d%22])  BY OFSYSSMTP4.hq2.rep ([[fe80::7061:8ff8:aad5:1f7d%22])  VIA TCP  WITH HTTP  FOR <infinity.20014@mail.ru>;   Wed, 1 May 2013 15:00:14 -0400

MIME-Version: 1.0

Content-Type: text/html; charset=utf-8

Content-Transfer-Encoding: quoted-printable

Message-ID: <k7USxMxEsWqSaAaAaA3DjX2@OFSYSSMTP4.hq2.rep>

Date: Wed, 1 May 2013 15:00:14 -0400

List-Unsubscribe: <mailto:k7USxMxEsWqSaAaAaA3DjX2@unsubscribe.ofsys.com>

From: "SAPATO.RU" <no.reply@yourcompany.ru>

To:  <infinity.20014@mail.ru>

Subject: =?utf-8?Q?=D0=9F=D1=80=D0=B8=D1=8F=D1=82=D0=BD=D1=8B=D0=B9_C=D1=8E=D1=80=D0=BF=D1=80=D0=B8=D0=B7_=D0=BE=D1=82?= Sapato.ru =?utf-8?Q?=D0=96=D0=B4=D0=B5=D1=82_=D0=92=D0=B0=D1=81!?=

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www=

=2Ew3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">=0A<html xmlns=3D"http://w=

ww.w3.org/1999/xhtml">=0A<head>=0A    <title>=D0=9F=D1=80=D0=B8=D1=8F=D1=82=

=D0=BD=D1=8B=D0=B9 C=D1=8E=D1=80=D0=BF=D1=80=D0=B8=D0=B7 =D0=BE=D1=82 Sapat=

o=2Eru =D0=96=D0=B4=D0=B5=D1=82 =D0=92=D0=B0=D1=81!</title>=0A</head>=0A=0A=

<body style=3D"font:13px Arial;" bgcolor=3D"#FFFFFF">=0A=0A<table  bgcolor=

 

So they have added, with each “part”, the corresponding IdSendLog.

Then, all fragments of Messages are separated with lines « XPRT 1 », « XPRT 2 », and so forth.

The # corresponds to the definition bloc and recipient which preceeds the first part.

The last Message of the file will be prefixed « XPRT # LAST ».  (in the example given here, taken from an « event » which means a Single Message, it’s normal that this code appears after the first message, there’s only one Message in the file).

 

PURE SMTP need scrupulous Parsing from you

The content blocs contain the INTEGRAL Message in pure SMTP.

So all the SMTP headers, followed by the SMTP body, respect the MIME standard with bodies encoded in QUOTED-PRINTABLE.

It is important to note that the Message could be in MIME « multipart », with the presence of both TEXT and HTML Bodies.

So these fragments must not be decoded without precautions and taken in account this fact.  It is REALLY NECESSARY TO PARSE the MIME in order to treat them.

A quick Google search will help you to find how to do just that the right way in PHP.

 

LIBRARY in .NET which streams or searches into a BSMTP (see attached : version1.rar).

 

EXPORTED FILES:

We provide the SFTP login

Server : sftp.xxx.com

Login : YOUR-OFSYS-ACCOUNT

Password : 6546EN25+te%4r

 

Note : It's ONLY SFTP!! (FTP not allowed).

Structure of Folders is the following (in the SFTP root): 

\Account\ = normal files (for traditional auto imports-exports)

\C597\ = root of SMTP archives

\C597\P4440\ = root of SMTP archives for the project 4440

\C597\P4440\2013.05\ = archives of May 2013 (example)

\C597\P4440\2013.05\08\ Archives of 8th of may 2013

 

This directory will contain RAR files as described earlier.

If a file is present in these folders but without extension RAR, it's beacause it is in the process of preparation and MUST NOT be downloaded.

1 Comments

Please sign in to leave a comment.