Search code examples
javascriptnode.jsicalendarnodemailer

nodemailer calendar event invitation not working


I'm trying to send a calendar event from my gmail with nodemailer.

I generate the ics string with the npm package ics.

const message = {
    from: '...',
    to: [
         '...', 
         '...'],
    subject: 'Message title',
    text: 'Plaintext version of the message',
    html: '<p>HTML version of the message</p>',
    icalEvent: {
        content: value,
        method: 'request'
    }
};

this is my message config. The email is sent but on the macOS Mail Client can't read the email and displays it as no sender and no content. With Outlook the receiver sees the mail as if he is creating a new event. I can't really describe it, however the event is not added to the receivers calendar.

What am I doing wrong?


Solution

  • I was sending the emails to an office365 inbox which apparently reformats the message from a mime email into some weird calendar event.

    Works with every other inbox though (for example gmail).