Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
MSG C++
>
Tutorial
> Create contact
The following example shows you how to create a contact item.
C++ example
#include "independentsoft/msg/message.hpp" using namespace independentsoft::msg; int main() { Message contact; contact.set_message_class(u"IPM.Contact"); contact.set_subject(u"John Smith"); contact.set_display_name_prefix(u"Mr."); contact.set_display_name(u"John Smith"); contact.set_given_name(u"John"); contact.set_surname(u"Smith"); contact.set_company_name(u"Independentsoft"); contact.set_email1_address(u"john@independentsoft.com"); contact.set_email1_display_as(u"John"); contact.set_email1_display_name(u"John"); contact.set_email1_type(u"SMTP"); contact.set_business_address_city(u"NY"); contact.set_business_address_street(u"First Street"); contact.set_business_address_country(u"USA"); contact.set_business_address(u"First Street, NY, USA"); contact.set_business_phone(u"555-666-777"); contact.save("c:/temp/contact.msg", true); return 0; }
Need help? Ask our developers:
Name*
Email*
Message*