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 5 Next »

Method parameters

Sends a newsletter

  • string SendNewsletter(string accessKey, int listID, int newsletterID, Option[] options)
  • accessKey: access key obtained using the Login method
  • newsletterID: identificativo del messaggio ritornato dal metodo CreateNewsletter 
  • options: un array di coppie key/value per impostare le varie opzioni di invio
    • from_email: a string containing the sender email address. If not specified, the default value for the list will be used
    • from_name: a string containing the sender name. If not specified, the default value for the list will be used
    • clear_stats: a boolean value to enable/disable the deletion of statistics referred to previous mailings of the same message
    • send_to: a mandatory string indicating to whom the message will be sent. If send_to=ALL the message is sent to all subscribers, if send_to=RECIPIENTS the message is sent to specific email addresses, if send_to=GROUPS the message is sent to subscribers to specific groups
    • recipients: a string indicating the recipients of the message. Its content depends on the value assumed by "send_to". If send_to = ALL, "recipients" parameter is ignored and the message is sent to all the recipients in the list; if send_to=RECIPIENTS, "recipients" parameter contains a list of email addresses separated by ";" character; if send_to=GROUPS, il "recipients" parameter contains the IDs of the recipient groups, separated by the ";" character 
    • exclude: a string containing the IDs of the groups to be excluded from the sending, separated by the ";" character
    • filters: una stringa contenente l'elenco dei filtri (identificativi) separati dal caratteri ; da utilizzare per individuare gli utenti ai quali dovrà essere inviato il messaggio.
    • filters_as: una stringa che indica la modalità di applicazione degli eventuali filtri indicatifilters_as=AND, tutti i filtri devono essere soddisfattifilters_as=OR, almeno uno dei filtri deve essere soddisfatto
    • deliverydt: una stringa contenente la data e l'ora per la quale deve essere schedulato la partenza dell'invio. Il formato deve essere il seguente: yyyyMMddHHmmss. Se non specificato l'invio inizia immediatamente ed in caso di invio già in corso il messaggio viene accodato a quelli in uscita.
    • timezone: un intero che identifica il fuso orario.
    • campo1 … campo<nn> = nel caso l'opzione recipients contenga l'elenco degli indirizzi email è possibile indicare uno o più campi anagrafici da aggiornare. Ogni option "campo<nn>" è una stringa contenente i valori per il campo anagrafico <nn> per gli indirizzi email indicati nell'opzione "recipients". Anche in questo caso, i valori devo essere separati dal carattere ;.

Se il codice di errore è 0, il messaggio conterrà l'identificativo del'invio.
Esempio di messaggio SendNewsletterResult:
<SendNewsletterResult>
<errorCode>0</errorCode>
<errorDescription>0</errorDescription>
<listID>1</listID>
<newsletterID>1</newsletterID>
<deliveryStatus>Sending in progress</deliveryStatus>
</SendNewsletterResult>

Come specificare i campi anagrafici


E' importante che il numero di elementi indicati per ogni option "campo<nn>" sia uguale al numero di indirizzi specificati nella option "recipients".
Si supponga di voler effettuare un invio a tre indirizzi email: recipients=m.rossi@example.com;m.bianchi@example.com;p.verdi@example.com
Se, ad esempio, si vogliono specificare i dati anagrafici Nome e Cognome, supponendo che nella nostra anagrafica siano rispettivamente campo1 e campo2, questi vanno indicati nel seguente modo:
campo1=Mario;Mauro;Paolo
campo2=Rossi;Bianchi;Verdi
Nel caso un campo anagrafico sia vuoto, questo va comunque indicato, questo per aver sempre un ugual numero di elementi:
campo1=Mario;;Paolo
campo2=Rossi;;Verdi
(per il secondo indirizzo email non sono stati indicati i campi anagrafici)

  • No labels