LoginFromId method sample code

The following is sample code for the LoginFromId method. Additional code samples will be added soon.


Add a Web reference by entering the URL to the WebService MailupSend (http://services.mailupnet.it/MailupSend.asmx) and specifying a name for it. See how to Add a Web reference in Visual Studio

it.mailupnet.services.MailupSend myService = new it.mailupnet.services.MailupSend();
string s = myService.LoginFromId(user, password, myconsoleID); // executing return message parsing
System.Xml.XmlDataDocument docXML = new System.Xml.XmlDataDocument();
// retrieving error code
System.Xml.XmlNodeList error = docXML.GetElementsByTagName("errorCode");
errorCode = Convert.ToInt32(error[0].InnerText);
// retrieving access key
if (errorCode == 0)
  System.Xml.XmlNodeList key = docXML.GetElementsByTagName("accessKey");
  accessKey = key[0].InnerText;
// calling other webservice methods
Note: the accessKey returned by the LoginFromId method in the MailUpSend Web Service can also be used for the MailUpReport and MailUpManage Web Services.