Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    AnushKatari
    @AnushKatari

    Hi Gautam,

    I'm trying to get complete email as a msg/eml file and save it on my disk. Is it possible by using ews-javascript-api ? Can you please tell me how to achieve this ?

    Gautam Singh
    @gautamsi
    @rezags sorry, I was on vacation and could not catch up, i have posted an answer for this
    Ahmed Rebai
    @Rebaiahmed
    Hi
    i need help
    i want to know how to fetch emails from a specific date ?
    with SearchFilter
    Gautam Singh
    @gautamsi
    const sfs = new SearchFilter.IsGreaterThan(ItemSchema.DateTimeReceived, DateTime.Parse("2014/12/29 07:43:08.999" /* any moment compatible value */ /* [, DateTimeKind.Unspecified or DateTimeKind.Local or DateTimeKind.Local */));
    const femaa = service.FindItems(WellKnownFolderName.Inbox,sfs, iItemView);
    RezaFFM
    @RezaFFM
    Hi Gautam, I understand that in the gulpfile the typescript files are converted to .js files, but I cannot find the line of code where these files are then copied to the .js-folder, could you please tell me where and when this happens? Thank you.
    Gautam Singh
    @gautamsi
    gulp.task('ts-compile', function (done) {
        var outdir = path.join(process.cwd(), 'build/output/node');
        runTSC('.', outdir, [], done);
    });
    RezaFFM
    @RezaFFM
    Hi Gautam, I moved from gulp to webpack, sorry for any not advanced questions, I came that far actually, I would read the code as follows, the output is copied to the working director and then put into 'build/output/node' - from here I just dont get when the output is copied to a '/js' folder - Did I miss any configuration file or whatsoever?
    RezaFFM
    @RezaFFM
    For instance, if I try the following
    npm run gulp build, it will run finally the gulp task ts-compile, which then finally will run 'node_modules/typescript/bin/tsc', then I will find a build folder in the root of the module project, but then in the root folder I see a src foldr and a test folder. These folders gets created by the the tsc package I would pressume? Is that correct? And if I then run npm install ews-javascript-api, I noticed that I only have the js and typings folders - where is the code that does this copying actually? I cannot really follow the build process, sorry for that.
    Gautam Singh
    @gautamsi
    you have to npm install from 'build/output/node'
    what is the reason you used webpack?
    RezaFFM
    @RezaFFM
    Sorry for the confusing, with webpack I mean that I am used to webpack and not to gulp. I cloned the project and then I ran 'npm run npmprep' which then installs the folder 'build/output/node'. So this is fine.
    I just dont find the line of code that creates these two folders in there 'src' and 'then'. Where does this happen? I am just intersted to understand the process
    I mean 'src' and 'test'
    RezaFFM
    @RezaFFM
    maybe I found the lines I was searching, they are in gulp.config.js 12 to 20, where it says.
            files: [
                './src/**/*.ts',                                                
            ],
    RezaFFM
    @RezaFFM
    ok, I think my confusing were coming from the tsconfig.json file. When you compile with gulp, you pass in the root folder '.' as inputdir. It then goes to all folders and searches for files with a .ts ending, right? Then it outputs into the src folder accordingly.
    Gautam Singh
    @gautamsi
    tsconfig at root is for vscode to understand and provide hints/checks
    gulpfile extends this and add more option to each compile type
    Faruktulumcu
    @Faruktulumcu
    Hi @gautamsi , I'm using your library in a nodejs application written in typescript, when I'm compiling there are some errors, such as missing of XMLHttpRequest, Node etc. I noticed that you forget to import it from fetch library, therefore I had to edit some part of code. My problem is when I'm sharing this project with my team I must also share node_modules. Is it possible to correct the missing not imported libraries?
    Faruktulumcu
    @Faruktulumcu
    image.png
    these errors are also in ews-javascript-api-auth, I had to correct all and I have correct version, if you want I can send you the zipped version
    Gautam Singh
    @gautamsi
    Please open an issue in github
    Gautam Singh
    @gautamsi
    @Faruktulumcu you should set skiplibcheck to true in your tsconfig. This way it will skip checking the ews lib for errors.
    there is no missing library, latest Typescript has excluded browser stuffs from core lib.d.ts where XMLHttpRequest was defined
    Bryan Reagan
    @breagan1983
    Hi there, does anyone happen to have a working example of a exch.ArchiveItems()
    I'm screwing up either hte array of ItemIds, or the ArchiveSourceFolderId
    I have a user account that's got >88k messages that need to be archived based on regex critera, the rest can be deleted
    Gautam Singh
    @gautamsi
    sorry for late response, you should do: exch.ArchiveItems([item-id-1, item-id-2 .... ], FolderId)
    you have to do search first, unfortunately there is no REGEX support in ews. you can regex test the subject or other details locally, it means fetching 88k items and filter them out locally
    Bryan Reagan
    @breagan1983
    Thanks for hte response! Turns out our O365 tenant doesn't even support "Archiving' per se (turns out you can turn that off), so I just manually created a Archive folder and moved the messages
    Bryson Edwards
    @SomniVertix
    Hey! I'm not sure if I'm missing something or just didn't see it yet, but is this project able to just read email messages, if so, how?
    Gautam Singh
    @gautamsi
    you can use this lib to access email message in Exchange server. You can read email message as well.
    Bryson Edwards
    @SomniVertix
    Do you have an example of this?
    Gautam Singh
    @gautamsi
    you can use Item.Bind operation (Item is exported from lib)
    Bryson Edwards
    @SomniVertix
    I dont think i understand how to use the Item element...
    or really how to use this lib in general lol
    davistran86
    @davistran86
    Hi @gautamsi , I'm new to your ews-javascript-api, can you help me on getting this shared calendar link using your esw-javascript-api ? I have successful connected to ews but don't know how to get this link :( https://imgur.com/a/NUy71MO
    davistran86
    @davistran86
    In powershell I can find it by Get-MailboxCalendarFolder -Identity kai:\Calendar , I tried to search for Calendar folder but got 0 result.
    const folderId = new ews.FolderId(
      ews.WellKnownFolderName.Calendar,
      new ews.Mailbox("test@example.com")
    );
    
    exch.FindFolders(folderId, new ews.FolderView(10)).then(res => {
      // console.log(res);
      res.Folders.forEach(f => {
        console.log(f.DisplayName);
      });
    });
    Gautam Singh
    @gautamsi
    you need to have proper permission to get this through EWS. you dont want to search basing the calendar folder, you want to use WellKnownFolderName.MsgFolderRoot or WellKnownFolderName.Root while searching for the folder.
    as this is one of the WellKnownFolderName you can use Folder.Bind method to get directly to calendar folder.
    davistran86
    @davistran86
    @gautamsi thanks, I will try it :)
    davistran86
    @davistran86
    @gautamsi seem there is no way to obtain those url with ews :(, do you have any idea ? I need to get all the shared calendar url of users in AD :(
    Gautam Singh
    @gautamsi
    Gautam Singh
    @gautamsi
    I dont think you can get that URL using ews, I dont know if that is hiding in some extended property
    davistran86
    @davistran86
    @gautamsi thanks, I'll give it a try :)