NAV Create and Send Invitation outlook mail

YY1425YY1425 Member Posts: 2
edited 2015-04-20 in NAV Three Tier
Hi, I am trying to create and auto send an outlook invitation mail to another party. However the program does not seems to be able to send the email. Below is the code. Is there any missing code? The code on oAppointment.Send(); does not seems to send out the email.


outlookApp := oAppClass.ApplicationClass();
oAppointment := oAppointmentClass;

oAppointment := outlookApp.CreateItem(1);
oAppointment.Subject := 'subject';
oAppointment.Body := 'test subject';
oAppointment.Location := 'test location';
oAppointment.Start := CREATEDATETIME("Date of Event","Start Time");
oAppointment."End" := CREATEDATETIME("Date of Event","End Time");

oAppointment.ReminderSet := TRUE;
oAppointment.ReminderMinutesBeforeStart := 7200;
oAppointment.ReminderPlaySound := TRUE;

oAppointment.RequiredAttendees('emailaddress');

oAppointment.Save();
oAppointment.Send();

Comments

Sign In or Register to comment.