Method parameters
...
- string CreateNewsletter(string accessKey, int listID, string subject, string type, string content, Option[] options)
- accessKey: access key obtained using the Login method
- listID: ID of the list within which the newsletter has to be created. Lists and corresponding IDs can be obtained calling the GetLists Method
- subject: subject of the email message
- type: type of message text (HTML, URL, FILE, TEXT)
- content: message text source, depending on the type:
- type = HTML, content is the HTML code of the message
- type = TEXT, content is the PLAIN-TEXT of the message
- type = URL, content is the url from which to draw the HTML code of the message
- type = FILE, content is a byte array from which to draw the HTML code of the message
- options: an array of key/value pairs for options setting
- note: a string containing notes about the message
- dyn_fld: boolean value to enable/disable the use of dynamic fields in the message (dyn_fld=true, dyn_fld=false)
- emb_img: boolean value to enable/disable the use of embedded images in the message (emb_img=true, emd_img=false)
- link_track: boolean value to enable/disable the use of link tracking in the message (link_trcak=true, link_track=false). If link_track=true and no other option is specified all the protocols are activated.
- track_http: boolean value to enable/disable the use of http protocol tracking in the message (track_http=true, track_http=false)
- track_https: boolean value to enable/disable the use of HTTPS protocol tracking in the message (track_https=true, track_https=false)
- track_mailto: boolean value to enable/disable the use of MAILTO protocol tracking in the message (track_mailto=true, track_mailto=false)
- track_ftp: boolean value to enable/disable the use of FTP protocol tracking in the message (track_ftp=true, track_ftp=false)
- track_news: boolean value to enable/disable the use of NEWS protocol tracking in the message (track_news=true, track_news=false)
- link_params: a string allowing to specify additional parameters for tracked links
- body_code: a string containing a personalized code for the <body> tag
- header: a string containing a personalized code for the <header> tag
- conf_msg: boolean value to mark the message used as a subscription confirmation
- attach<nn>_data = base64 file encoding
- attach<nn>_name = filename
- template = ID of the template to be used for newsletter creation. In case the "template" parameter is specified, "body_code" and "content" parameters will be ignored.
If error code=0, the message will contain the ID of the newsletter which has been created
Sample CreateNewsletter request
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
<soap:Header/>
<soap:Body>
<ws:CreateNewsletter>
<ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2shjHWIN4f5xYBJx9uda/Mo</ws:accessKey>
<ws:listID>1</ws:listID>
<ws:subject>This is a new html newsletter</ws:subject>
<ws:type>HTML</ws:type>
<ws:content>hello [FirstName] </br ></br > lorem ipsum dolor sit amet, consectetur adipiscing elit. </ws:content>
<ws:options>
<ws:Option><ws:Key>dyn_fld</ws:Key><ws:Value>true</ws:Value></ws:Option>
<ws:Option><ws:Key>note</ws:Key><ws:Value>testing html message</ws:Value></ws:Option>
<!--you can add one or more attachments: do not specify "CDATA" for encoded data-->
<ws:Option><ws:Key>attach01_data</ws:Key><ws:Value>llPxu+vqfw/+R/As7 ... kVRRmrwTMgAAAABJRU5ErkJggg==</ws:Value></ws:Option>
<ws:Option><ws:Key>attach01_name</ws:Key><ws:Value>myfile.png</ws:Value></ws:Option>
</ws:options>
</ws:CreateNewsletter>
</soap:Body>
</soap:Envelope> |
Sample CreateNewsletter response
...