Raw Email to JSON

email, sendgrid, parse, json, mailgun, mail

Algorithmia Platform License

Run an Example

Install & Use

Use

curl -X POST -d '"Delivered-To: example@example.com\r\nReceived: by 10.176.10.15 with SMTP id q15csp267918uah;\r\n        Thu, 22 Jun 2017 08:56:00 -0700 (PDT)\r\nX-Received: by 0.0.0.0 with SMTP id example.1.1.2.2.3.3;\r\n        Thu, 22 Jun 2017 08:56:00 -0700 (PDT)\r\nReturn-Path: <sender@example.com>\r\nReceived: from mail.example.com (mail.example.com. [123.456.789.123])\r\n        by mail56.example.com with ESMTPS id fg695h5f9h549vg4hb98f\r\n        for <example@example.com>\r\n        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r\n        Thu, 22 Jun 2017 08:56:00 -0700 (PDT)\r\nReceived-SPF: pass (examole.com: domain of sender@example.com designates 0.0.0.0 as permitted sender) client-ip=0.0.0.0;\r\nMIME-Version: 1.0\r\nTo: \"John Doe\" <example@example.com>\r\nFrom: \"Jane Doe\" <sender@example.com>\r\nSubject: Test Subject\r\nDate: Thu, 22 Jun 2017 17:55:56 +0200\r\nImportance: normal\r\nX-Priority: 3\r\nContent-Type: multipart/alternative; boundary=\"_A324B2F8-13BF-4A72-8863-D9530242013B_\"\r\nMessage-Id: <20170622155558.CEEF71420B83@hnode1.korenc.eu>\r\n\r\n--_A324B2F8-13BF-4A72-8863-D9530242013B_\r\nContent-Transfer-Encoding: quoted-printable\r\nContent-Type: text/plain; charset=\"utf-8\"\r\n\r\nIs this a test?\r\n\r\n--_A324B2F8-13BF-4A72-8863-D9530242013B_\r\nContent-Transfer-Encoding: quoted-printable\r\nContent-Type: text/html; charset=\"utf-8\"\r\n\r\n<html xmlns:o=3D\"urn:schemas-microsoft-com:office:office\" xmlns:w=3D\"urn:sc=\r\nhemas-microsoft-com:office:word\" xmlns:m=3D\"http://schemas.microsoft.com/of=\r\nfice/2004/12/omml\" xmlns=3D\"http://www.w3.org/TR/REC-html40\"><head><meta ht=\r\ntp-equiv=3DContent-Type content=3D\"text/html; charset=3Dutf-8\"><meta name=\r\n=3DGenerator content=3D\"Microsoft Word 15 (filtered medium)\"><style><!--\r\n/* Font Definitions */\r\n@font-face\r\n=09{font-family:\"Cambria Math\";\r\n=09panose-1:2 4 5 3 5 4 6 3 2 4;}\r\n@font-face\r\n=09{font-family:Calibri;\r\n=09panose-1:2 15 5 2 2 2 4 3 2 4;}\r\n/* Style Definitions */\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n=09{margin:0cm;\r\n=09margin-bottom:.0001pt;\r\n=09font-size:11.0pt;\r\n=09font-family:\"Calibri\",sans-serif;}\r\na:link, span.MsoHyperlink\r\n=09{mso-style-priority:99;\r\n=09color:blue;\r\n=09text-decoration:underline;}\r\na:visited, span.MsoHyperlinkFollowed\r\n=09{mso-style-priority:99;\r\n=09color:#954F72;\r\n=09text-decoration:underline;}\r\n.MsoChpDefault\r\n=09{mso-style-type:export-only;}\r\n@page WordSection1\r\n=09{size:612.0pt 792.0pt;\r\n=09margin:70.85pt 70.85pt 70.85pt 70.85pt;}\r\ndiv.WordSection1\r\n=09{page:WordSection1;}\r\n--></style></head><body lang=3DSL link=3Dblue vlink=3D\"#954F72\"><div class=\r\n=3DWordSection1><p class=3DMsoNormal>Is this a test?<o:p></o:p></p></div></=\r\nbody></html>\r\n--_A324B2F8-13BF-4A72-8863-D9530242013B_--"' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/andraz/SendGridRawEmailtoJSON/0.1.4