@independentsoft/msg
Version:
Outlook .msg file module
24 lines (20 loc) • 794 B
JavaScript
import * as msg from './../independentsoft/msg.js';
import * as fs from 'fs';
let contact = new msg.Message()
contact.messageClass = "IPM.Contact";
contact.subject = "John Smith";
contact.displayNamePrefix = "Mr.";
contact.displayName = "John Smith";
contact.givenName = "John";
contact.surname = "Smith";
contact.companyName = "Independentsoft";
contact.email1Address = "john@independentsoft.com";
contact.email1DisplayAs = "John";
contact.email1DisplayName = "John";
contact.email1Type = "SMTP";
contact.businessAddressCity = "NY";
contact.businessAddressStreet = "First Street";
contact.businessAddressCountry = "USA";
contact.businessAddress = "First Street, NY, USA";
contact.businessPhone = "555-666-777";
fs.writeFileSync("e:\\contact.msg", contact.toBytes());