You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gautam Singh edited this page Mar 13, 2016
·
1 revision
varexch=newExchangeService(ExchangeVersion.Exchange2013);exch.Credentials=newExchangeCredentials(credentials.userName,credentials.password);exch.Url=newUri("https://outlook.office365.com/Ews/Exchange.asmx");EwsLogging.DebugLogEnabled=true;// false to turnoff debugging. varmsgattach=newEmailMessage(exch);msgattach.Subject="Dentist Appointment";msgattach.Body=newMessageBody("The appointment is with Dr. Smith.");msgattach.ToRecipients.Add("grouptest@mysupport.in")varfile=msgattach.Attachments.AddFileAttachment("filename to attach.txt","c29tZSB0ZXh0");/** AddFileAttachment parameters - * filename (name of attachment as shown in outlook/owa not actual file from disk), * base64 content of file (read file from disk and convert to base64 yourself) */msgattach.Send().then(()=>{console.log("------------");},(ei)=>{console.log(ei.stack,ei.stack.split("\n"));console.log("------------");});