sebbo2002 / ical-generator

ical-generator is a small piece of code which generates ical calendar files
MIT License
748 stars 162 forks source link

Ical doesn't add automatically into calendar #246

Closed shashankrepo closed 3 years ago

shashankrepo commented 3 years ago

I'm getting the same issue - not adding automatically to the calendar. My code looks like this.

const content = ical({
    domain: 'google.com',
    prodId: '//Google Inc//Google Calendar 70.9054//EN',
    timezone: 'Australia/Brisbane',
    method: 'PUBLISH', //REQUEST
    scale: 'GREGORIAN',
    events: [
      {
        start: moment(),
        status: 'CONFIRMED',
        end: moment().add(1, 'hour'),
        summary: 'Calendar invite test',
        organizer: {
          name: 'Shashank Kumar',
          email: 'xyz@gmail.com',
          mailto: 'xyz@gmail.com'
        },
        location: 'Zoom',
        attendees: [
          {
            email: 'abc@gmail.com',
            name: 'John',
            rsvp: true,
            status: 'NEEDS-ACTION'
          },
          {
            email: 'mno@gmail.com',
            name: 'Mike Jack',
            rsvp: true,
            status: 'NEEDS-ACTION'
          },
          {
            email: 'xyz@gmail.com',
            name: 'Will Paul',
            rsvp: true,
            status: 'NEEDS-ACTION'
          }
        ]
      }
    ]
  }).toString();

calling with Nodemailer

message: {
      to: toEmail,
      headers: {
        'x-invite': {
          prepared: true,
          value: id
        }
      },
      alternatives: [
        {
          contentDisposition: 'attachment',
          filename: 'meeting.ics',
          contentTransferEncoding: '7bit',
          contentType: 'text/calendar; charset="utf-8"; method=PUBLISH',
          content: content
        }
      ]
    },

I have added attendees but it is not showing up in the calendar (Google, Apple).

sebbo2002 commented 3 years ago

Please understand that I cannot give support for client- and calendar implementations. I simply do not have the capacity for this. If you see a bug in ical-generator or invalid results are produced by it, you are of course welcome to contact me again.

I would leave the issue open here, maybe someone else has already solved the problem and is kind enough to help...

samuelfruhauf commented 3 years ago

I'm facing the same problem, have a solution?

Gr8z commented 3 years ago

After the major update, I also don't see any events being added to my outlook calendar. This was something working before in v1, but now renders the event file useless when opened in outlook.

sebbo2002 commented 3 years ago

@Gr8z Can you play back the code and generate an iCal file? Then you could compare what has changed between v1 and v2 and possibly recreate the problem.

Unfortunately, I don't have Outlook, so I can't test it on my computer.

Gr8z commented 3 years ago

I apologize for my stupidity but the reason why the event was not showing up on my Outlook calendar is because I was creating one in 2020 instead of 2021. Took me several days to figure this out.

Other than that, v2 is working great.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 14 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. Thank you for your contributions :heart: