Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

The SendMessageNL method:

  1. Allows to send a message to the recipients listed in a CSV file
  2. Synchronously executes the following steps:

    1. Scheduling of a sending at the date and time contained in the parameters
    2. Return of a delivery ID to the caller

  3. Asynchronously executes the following steps:

    1. Creation of a group in MailUp in which to gather the recipients that have to be imported
    2. Import to MailUp of the recipients included in the file. Recipients will be imported to the list indicated by the filename (see details)

Method parameters

  • int SendMessageNL(string accessKey, string fileName, string separator, string listId, string listGuid, string messageId, string senderName, string sender, string subject, DateTime timeDateSending, int sendDelayTest)
    • accessKey: access key obtained using the LoginFromId method
    • fileName: name of the CSV files containing the recipients of the message
    • separator: separating character used in the CSV file. If null or empty, the character ';' will be used by default.
    • listId: list identifier
    • listGuid: GUID of the list in MailUp
    • messageId: ID of the message to be sent
    • senderName: name of the sender of the message. If null or empty, the system will use the default name for the list.
    • sender: email address of message sender. If null or empty, the system will use the default address for the list. If no default sender has been defined for the list, the sending does not start.
    • subject: subject of the message
    • timeDateSending: date and time of scheduled sending
    • sendDelayTest: no more used, always set to zero.

Parameters listGuid listId can be used together or alternatively, passing one of them as null or empty: in the first case the list is verified using both parameters, otherwise using only the provided parameter.

 

SendMessageNL method

  • Requires the CSV file to be moved to MailUp servers before method is called
  • Manages import and sending for a specific list. Differently from batch FTP imports from a CSV file, this method does not allow to import contacts to different lists. All recipients must be imported in the same list
  • The file containing the recipients must be in CSV format (can also be provided in a compressed format using ZIP compression).The file and its fields must be structured following the guidelines contained in the CSV file description

 

 

SendMessageNL is often the best option for a fast bulk import and sending but users should be aware of some known limitations

The method returns

  • the ID of the sending
  • -1 in case the operation is not completed successfully (e.g. due to incorrect parameters or system failure).

Since SendMessageNL starts an asynchronous task, in some cases a failure may occur after the method call is completed. In this case the failure is notified by means of an alert

 

SOAP Examples

 

Sample request

SOAP request (Scheduled sending with time zone)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
	<soap:Header/>
	<soap:Body>
		<ws:SendMessageNL>
			<ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey>
			<ws:fileName>10_201105031527211234.csv</ws:fileName>
			<ws:separator>;</ws:separator>
			<ws:listId>10</ws:listId>
			<ws:listGuid>0e591119-cd77-4157-9379-6ac75335664</ws:listGuid>
			<ws:messageId>151</ws:messageId>
			<ws:senderName>Your Dealer</ws:senderName>
			<ws:sender>sender@example.com</ws:sender>
			<ws:subject>Best Offer of the week</ws:subject>
			<!-- +02:00 is the shift due to time zone setting. If not specified, the time zone of Italy will be used -->
			<!-- Please take into account note that time shift changes during Daylight saving time (e.g. during summer its value for Italy is +02:00 instead of +01:00) -->
			<ws:timeDateSending>2013-05-22T13:00:00.000+02:00</ws:timeDateSending>
		</ws:SendMessageNL>
	</soap:Body>
</soap:Envelope>

 

Sample response

SOAP response (successful, returns sending ID)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <SendMessageNLResponse xmlns="http://services.mailupnet.it/WS">
         <SendMessageNLResult>226</SendMessageNLResult>
      </SendMessageNLResponse>
   </soap:Body>
</soap:Envelope>
SOAP response (request failed)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <SendMessageNLResponse xmlns="http://services.mailupnet.it/WS">
         <SendMessageNLResult>-1</SendMessageNLResult>
      </SendMessageNLResponse>
   </soap:Body>
</soap:Envelope>

 

 

  • No labels