The SendMessageNL method:
- Allows to send a message to the recipients listed in a CSV file
- Synchronously executes the following steps:
- Scheduling of a sending at the date and time contained in the parameters
- Return of a delivery ID to the caller
- Asynchronously executes the following steps:
- Creation of a group in MailUp in which to gather the recipients that have to be imported
- Import to MailUp of the recipients included in the file. Recipients will be imported to the list indicated by the filename (see details)
- 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: required but not used, you can either set it to NULL or empty string value
- timeDateSending: date and time of scheduled sending
- sendDelayTest: no more used, always set to zero.
Parameters listGuid e 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.
- 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 likely 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 did not complete successfully (e.g. due to incorrect parameters or system failure). In this case no recipient has been imported and no message has been sent.
You should then check:
- if parameters fileName, messageId and accessKey have been provided.
- if parameter accessKey is correct (it should contain the key obtained from login method).
- that at least one of the parameters listId and ListGuid has been provided. And if their values are correct.
- that the sender argument contains a valid email address or an empty string when provided.
- -3 in case the request command to start import to MailUp of the recipients included in the file fail. (e.g. due to an import operation already running that the system doesn't recognize).
If this is the case, you should login into your mailup account and check if the import process was successfully queued. If so, the dispatch will take place correctly, else, it would be required to run once again the SendMessageNL method.
Since SendMessageNL starts as 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
- CSV files to be used with SendMessageNL
- FTP Folder Naming Conventions
- Known limitations for SendMessageNL
- SendMessageNL alerts