Download your emails in MIME format with POP3

Automatically translated from English

Do you need to store all business emails, for example, for legal or fiscal purposes? These documents must be stored as they are. That is, how they were received … in their original, unconverted formats. 4D v18 R3 answers this need by providing you with a new method allowing you to get emails in their original MIME format.

The POP3_transporter.getMIMEAsBlob( ) method enables you to obtain a BLOB containing the MIME content for a specific message:

$server:=New object
$server.host:="yourPOP3host.com"
$server.port:=995
$server.user:="4D.POP3@mail.com"
$server.password:="XXXXXX"

// Create a transporter from your server information
$POP3_transporter:=POP3 New transporter($server)

$blob:=$POP3_transporter.getMIMEAsBlob($mailNumber)

You can save the BLOB in your database or anywhere else. To transform your MIME into a mail object, just use the MAIL Convert from MIME command :

$mail:=MAIL Convert from MIME($blob)

Need more information? Check out the documentation.

Fabrice Mainguené

• Product Owner •

Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.

After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.