With Sitefinity CMS, you can import and export subscribers to mailing lists. You may also have subscribers with custom fields, for example, Phone number or Company. By default, Sitefinity CMS does not take any custom fields during import or export of subscribers.
You can import subscribers with custom fields by creating a separate user widget or page for this specific purpose. The following code sample demonstrates how to import subscribers' list in Sitefinity CMS from the MySubscribers CSV file:
In the code above, you get an instance of the NewslettersManager class, which you later use to create new subscribers. To open a CSV file, you use the File class and read the contents of the file line by line. In this example, the first line contains column headers that correspond to the field names of subscribers, for example First name and so on. The rest of the lines in the CSV file contain the field data for each subscriber, including the custom fields. Using the CreateSubscriber method of the the newsletters manager, you create a new subscriber and set the desired field values. Finally, you save the changes of a the newsLetterManager class.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity