Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
MSG JS
>
Tutorial
> Create contact
The following example shows you how to create a contact item.
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());
Need help? Ask our developers:
Name*
Email*
Message*