Our Email Extractor API is designed for small and big businesses that need an efficient API to extract emails. It is secure, fast, and easy to use when you want to extract email, get email information, or extract attachments.

The Email Extractor API can decode emails and extract emails with attachments. These emails can be parsed by its individual parts such as the name and email address of the sender, name and email address of the recipient, body of the email, subject, etc.

The API can merge the emails and their attachments into a single PDF document. The email to PDF conversion’s supported source files are .EML and .MSG.

Aside from email parsing and email to PDF conversion, it also has a standalone email attachment extractor that separates the attachments from the email and returns them as downloadable files.

When a file is generated by our server, it is stored under a random name and is permanently removed after 1 hour by default. To learn more about PDF.co security, please check out our Security page https://pdf.co/security

Email Extractor API Benefits

Merge Emails and Attachments

The Email Extractor API extracts, converts, and merges the email and its attachment into a single PDF document.

Decode Email

The Email Extractor API can decode an email and generate a JSON file that contains the individual parts of an email. These parts are separated as their own JSON object to easily reference them.

Extract Attachments

The Email Extractor API can extract the email attachments and generate temporary links to download them individually.

Security

The private data in your possession has some legal protection. That is why you must only use email extractors that encrypt and do not share personal data. When using our email extractor APIs, your data is sent to secure Amazon AWS servers using SSL/TLS encryption.

Access to Integrations

Email Extractor on our PDF.co platform also works via integration on different business automation platforms. They include Zapier and IntegromatUiPath, and BluePrism. You can easily use 300+ API integrations to connect with the most popular applications.

On-Premise API Server

PDF.co offers an on-premise API Server to businesses and enterprises that prefer to host the API on their own premises for strict in-house data handling. The on-premise API Server can be configured for optimal performance. To get a trial, please send a request to our customer support.

Sign Up

Email Extractor API Integrations

PDF.co has over 300+ app integration. Kindly explore our following plugins:

Email Extractor API Samples & Demo

In this demonstration, we will convert and merge an email with attachments into PDF using the /v1/pdf/convert/from/email endpoint. Our sample email is in the .EML format and contains 2 PDF email attachments.

Following are images of the input .EML file and the output PDF document.

Email Extractor API Input EML File And Output PDF
Images of the input EML file and the output PDF

Let’s go over the /v1/pdf/convert/from/email endpoint’s parameters and their corresponding functions real quick.

Endpoint

URL: https://api.pdf.co/v1/pdf/convert/from/email
Method: POST
Parameter Description
url required. Link to input EML or MSG file to be converted.
embedAttachments optional. True by default.
convertAttachments optional. true by default.
margins optional. set to css style margins like 10px, 5mm, 5in for all sides.
paperSize optional. Can be Letter, A4, A5, A6 or custom size.
orientation optional. set to Portrait or Landscape. Portrait by default.
async optional. Set to true to run as async job in background.
profiles optional. Must be a String. Set custom configuration. See profiles examples here

 

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/from/email' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-to-pdf/sample.eml",
    "embedAttachments": true,
    "convertAttachments": true,
    "paperSize": "Letter",    
    "name": "email-with-attachments",
    "async": false,
    "encrypt": false
}'

The Email to PDF API cURL sample codes are available here.

Let’s see the Email to PDF API in action.

Email Extractor API Demo
Email to PDF API in action

The Email to PDF API JavaScript sample codes are available here.

The Email to PDF API PHP sample codes are available here.

The Email to PDF API Java sample codes are available here.

The Email to PDF API C# sample codes are available here.

Sign Up