Giter VIP home page Giter VIP logo

Comments (5)

gautamsi avatar gautamsi commented on August 29, 2024

these errors happen when server returned something can not be processed by underlying DOMParser.

try this and report any further issue.

1 do not pass Buffer, convert to base64 string then pass it. use utf-8 not UTF-8 if there is server error about encoding.
Note:nodejs base64 conversion with encoding uses utf8 not utf-8

2 email.save is a promise, use .then before processing further.

email.save(....).then(()=>{
   //saved
}, (err)=>{
  //error in saving
}); 

from ews-javascript-api.

gautamsi avatar gautamsi commented on August 29, 2024

above snippet is in typescript

from ews-javascript-api.

gautamsi avatar gautamsi commented on August 29, 2024

I just tested this, it works, I see the message getting saved in inbox. slight change from your example

change email.MimeContent = new ews.MimeContent("UTF-8", buffer); to email.MimeContent = new ews.MimeContent("UTF-8", buffer.toString('base64'));

make sure you treet save call as promise.

email.save(....).then(function(){
   //saved - cleanup code
}, function(err){
  //error in saving - cleanup code
console.log(err);
}); 

from ews-javascript-api.

Sennar81 avatar Sennar81 commented on August 29, 2024

It's work, it's fantastic

from ews-javascript-api.

gautamsi avatar gautamsi commented on August 29, 2024

great, good to know. Please spread the word if possible.

from ews-javascript-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.