ics event is not appearing as it should (using nodemailer / icalEvent)

0

event creation with ics library

let event  = {
  start: [schedule.start.getFullYear(), schedule.start.getMonth() + 1, schedule.start.getDate(), schedule.start.getHours(), schedule.start.getMinutes()],
  duration: {
    hours: schedule.duration.split(':')[0],
    minutes: schedule.duration.split(':')[1]
  },
  organizer: { name: schedule.createdUser, email: schedule.email },
  title: schedule.name,
  uid: schedule.uid,
  attendees: attendees,
  location: 'Portal',
  description: schedule.message ? schedule.message : "Sem descrição"
}

ics.createEvent(event, (error, value) => {
  if (error) {
    console.log(error)
  }
  this.value = value
  //return value;
})

using nodemailer

exports.sendMail = (email, template, subject, context, content) => {
  return new Promise((resolve, reject) => {
    let send = transporter.templateSender({
      subject: subject,
      text: template,
      html: template,
    });

    send({
      from: '"' + Config.email.fromName + '" <' + Config.email.from + '>', 
      to: email, 
      icalEvent: {
        method: /*context.method*/'REQUEST',
        content: content,
      }
    }, context, (error, info) => {
      if (error) {
        return reject(error);
      }
      return resolve(info);
    });
  });
}

where value of the first code is the content of the second (content of the ics file)

was for the event supposed to arrive like this:

Butit'slikethis:

Can anyone tell me what I'm doing wrong?

    
asked by anonymous 06.04.2018 / 18:03

0 answers