Returns all the newsletters created within a list

Method parameters

  • string GetNewsletters(string accessKey, intlistID)
    • accessKey: access key obtained using the LoginFromId method
    • listID: Id of the list in which the desired newsletters are contained. Lists and corresponding IDs can be obtained calling the GetLists Method

If error code=0, the message will contain the IDs of all the newsletters in the list.



Characters & and " are not escaped in returned response, so please avoid these characters in message subjects otherwise you will experience some problems due to an invalid returned XML

SOAP Examples

SOAP request
<soap:Envelope xmlns:soap="" xmlns:ws="">
          <!--Use accessKey value that is returned by LoginFromId method-->
SOAP response
<?xml version="1.0" encoding="utf-8"?>
<errorDescription />
  <subject>Sample Message (Read Me)</subject>
  <note>Review this test message for important information on how to create messages in MailUp</note>
  <creationdate>03/08/2011 12:32:31</creationdate>
  <subject>Sample Message created from a Template</subject>
  <note>This message was created using one of the 400 built-in templates</note>
  <creationdate>04/08/2011 12:32:31</creationdate>
  <subject>Bonnie &amp; Clyde</subject>
  <note>Bonnie &amp; Clyde</note>
  <creationdate>04/08/2011 16:36:32</creationdate>
  <subject>Confirm your subscription</subject>
  <note />
  <creationdate>05/08/2011 12:32:31</creationdate>
  <subject>Sample Message created from a Template(Copy)</subject>
  <note>This message was created using one of the 400 built-in templates</note>
  <creationdate>06/08/2011 12:32:31</creationdate>
  <note />
  <creationdate>07/11/2011 17:13:18</creationdate>

Code Examples

The code examples below are provided on an "as is" basis, without any warranty of any kind. MailUp shall not be held liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or other related to the example code. Please contact us if you are interested in submitting examples for programming languages that are not already included below.

# Refer to for gem information.
require 'mailup'
m ='username', 'password')
# => <GetNewslettersResult><errorCode>0</errorCode><errorDescription></errorDescription><list><listID>0</listID><listName></listName><newsletters></newsletters></list></GetNewslettersResult>"
C# myService = new;
... // perform login by means of LoginFromId(user, password, myConsoleID) method and obtain accessKey value
string s = myService.GetNewsletters(accessKey, 1); //Returns all that have been messages created within list 1
...//extract errorCode value from received response; 
if (errorCode == 0)
  // enter here if request was successful
  // then received response can be parsed to retrieve the messages that belong to specified list
class MailUpWsSend {
	protected $WSDLUrl = "";
	private $soapClient;
	private $xmlResponse;
	protected $domResult;
	function __construct() {
		$this->soapClient = new SoapClient($this->WSDLUrl,array("trace" => 1,"exceptions" => 0));
	public function getNewsletters($params) {
		try {
			$params = array_merge((array)$params, array("accessKey" => $this->accessKey));
			if ($this->readReturnCode("GetNewsletters","errorCode") != 0) 
				echo "<br /><br />Errore GetNewsletters: ". $this->readReturnCode("GetNewsletters","errorDescription");
			else $this->printLastResponse();
		} catch (SoapFault $soapFault) {	
$WsSend = new MailUpWsSend();
$WsSend->loginFromId(array("user" => "a123456","pwd" => "MyPassword","consoleId" => "123456"));
$WsSend->getNewsletters(array("listID" => "1"));