Get raw MIME for an Outlook Message The 2019 Stack Overflow Developer Survey Results Are In500 Internal Server error when calling APIHow to get MIME content of Office365 mail using Microsoft Graph API?How to send image and PDF in attachment using Microsoft graph SDKhow to get raw message with microsoft graph?Malformed JSON in Batch when getting Unified Group imagesUpdate message and Outlook Web caching?Getting Status of new Email send via MS GraphAPIUnable to send email message on behalf of another O365 outlook accountGetting wrong contentType from EML attachmentMessage delta API failed to return fields if only change is_read field

Is there a name of the flying bionic bird?

It's possible to achieve negative score?

"What time...?" or "At what time...?" - what is more grammatically correct?

How come people say “Would of”?

What tool would a Roman-age civilization have to grind silver and other metals into dust?

Which Sci-Fi work first showed weapon of galactic-scale mass destruction?

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

Should I use my personal or workplace e-mail when registering to external websites for work purpose?

Springs with some finite mass

Output the Arecibo Message

Any good smartcontract for "business calendar" oracles?

Access elements in std::string where positon of string is greater than its size

"Riffle" two strings

A poker game description that does not feel gimmicky

What do the Banks children have against barley water?

"To split hairs" vs "To be pedantic"

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Time travel alters history but people keep saying nothing's changed

Could JWST stay at L2 "forever"?

Does a dangling wire really electrocute me if I'm standing in water?

Inflated grade on resume at previous job, might former employer tell new employer?

What does "rabbited" mean/imply in this sentence?

Geography at the pixel level

Why is it "Tumoren" and not "Tumore"?



Get raw MIME for an Outlook Message



The 2019 Stack Overflow Developer Survey Results Are In500 Internal Server error when calling APIHow to get MIME content of Office365 mail using Microsoft Graph API?How to send image and PDF in attachment using Microsoft graph SDKhow to get raw message with microsoft graph?Malformed JSON in Batch when getting Unified Group imagesUpdate message and Outlook Web caching?Getting Status of new Email send via MS GraphAPIUnable to send email message on behalf of another O365 outlook accountGetting wrong contentType from EML attachmentMessage delta API failed to return fields if only change is_read field



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I was able to get the mail object with attachment using following API Call



https://graph.microsoft.com/v1.0/me/messages/$messageId?$expand=attachments


enter image description here



I need to save raw MIME for the mail (i.e. .eml) which will be uploaded to our internal CRM.



I understand that one can make a simple .eml file in below fashion but I want to know if there is a simpler alternative to get this from the API directly.



To: Demo-Recipient <demo@demo.example.com>
Subject: EML with attachments
X-Unsent: 0
Content-Type: multipart/mixed; boundary=--boundary_text_string

----boundary_text_string
Content-Type: text/html; charset=UTF-8

<html>
<body>
<p>Example</p>
</body>
</html>

----boundary_text_string
Content-Type: application/octet-stream; name=demo.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string
Content-Type: application/octet-stream; name=demo.log
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string--









share|improve this question



















  • 1





    I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

    – Marc LaFleur
    Mar 8 at 17:07











  • Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

    – Irfan Harun
    Mar 8 at 18:27






  • 1





    The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

    – Marc LaFleur
    Mar 8 at 20:36

















1















I was able to get the mail object with attachment using following API Call



https://graph.microsoft.com/v1.0/me/messages/$messageId?$expand=attachments


enter image description here



I need to save raw MIME for the mail (i.e. .eml) which will be uploaded to our internal CRM.



I understand that one can make a simple .eml file in below fashion but I want to know if there is a simpler alternative to get this from the API directly.



To: Demo-Recipient <demo@demo.example.com>
Subject: EML with attachments
X-Unsent: 0
Content-Type: multipart/mixed; boundary=--boundary_text_string

----boundary_text_string
Content-Type: text/html; charset=UTF-8

<html>
<body>
<p>Example</p>
</body>
</html>

----boundary_text_string
Content-Type: application/octet-stream; name=demo.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string
Content-Type: application/octet-stream; name=demo.log
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string--









share|improve this question



















  • 1





    I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

    – Marc LaFleur
    Mar 8 at 17:07











  • Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

    – Irfan Harun
    Mar 8 at 18:27






  • 1





    The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

    – Marc LaFleur
    Mar 8 at 20:36













1












1








1








I was able to get the mail object with attachment using following API Call



https://graph.microsoft.com/v1.0/me/messages/$messageId?$expand=attachments


enter image description here



I need to save raw MIME for the mail (i.e. .eml) which will be uploaded to our internal CRM.



I understand that one can make a simple .eml file in below fashion but I want to know if there is a simpler alternative to get this from the API directly.



To: Demo-Recipient <demo@demo.example.com>
Subject: EML with attachments
X-Unsent: 0
Content-Type: multipart/mixed; boundary=--boundary_text_string

----boundary_text_string
Content-Type: text/html; charset=UTF-8

<html>
<body>
<p>Example</p>
</body>
</html>

----boundary_text_string
Content-Type: application/octet-stream; name=demo.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string
Content-Type: application/octet-stream; name=demo.log
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string--









share|improve this question
















I was able to get the mail object with attachment using following API Call



https://graph.microsoft.com/v1.0/me/messages/$messageId?$expand=attachments


enter image description here



I need to save raw MIME for the mail (i.e. .eml) which will be uploaded to our internal CRM.



I understand that one can make a simple .eml file in below fashion but I want to know if there is a simpler alternative to get this from the API directly.



To: Demo-Recipient <demo@demo.example.com>
Subject: EML with attachments
X-Unsent: 0
Content-Type: multipart/mixed; boundary=--boundary_text_string

----boundary_text_string
Content-Type: text/html; charset=UTF-8

<html>
<body>
<p>Example</p>
</body>
</html>

----boundary_text_string
Content-Type: application/octet-stream; name=demo.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string
Content-Type: application/octet-stream; name=demo.log
Content-Transfer-Encoding: base64
Content-Disposition: attachment
ZXhhbXBsZQ==

----boundary_text_string--






microsoft-graph eml microsoft-graph-mail






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 17:01









Marc LaFleur

20.3k32034




20.3k32034










asked Mar 8 at 8:39









Irfan HarunIrfan Harun

891515




891515







  • 1





    I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

    – Marc LaFleur
    Mar 8 at 17:07











  • Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

    – Irfan Harun
    Mar 8 at 18:27






  • 1





    The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

    – Marc LaFleur
    Mar 8 at 20:36












  • 1





    I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

    – Marc LaFleur
    Mar 8 at 17:07











  • Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

    – Irfan Harun
    Mar 8 at 18:27






  • 1





    The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

    – Marc LaFleur
    Mar 8 at 20:36







1




1





I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

– Marc LaFleur
Mar 8 at 17:07





I've updated your question. What you're actually describing is the raw MIME text for the message. This isn't available in Graph yet but you can an early preview at /beta/me/messages/id/$value. Note that this is neither supported nor fully documented so please don't use this in production.

– Marc LaFleur
Mar 8 at 17:07













Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

– Irfan Harun
Mar 8 at 18:27





Thanks @MarcLaFleur , what alternative would you suggest me if i were to do it in production environment. Should i be looking into the other Outlook API ?

– Irfan Harun
Mar 8 at 18:27




1




1





The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

– Marc LaFleur
Mar 8 at 20:36





The Outlook REST API is effectively the same as Graph (they're the same API behind the scenes). The best option at the moment is most likely constructing the MIME version on your end.

– Marc LaFleur
Mar 8 at 20:36












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059470%2fget-raw-mime-for-an-outlook-message%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059470%2fget-raw-mime-for-an-outlook-message%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved