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

Performs a single sending of an email message, already existing or created as the request is executed.

Method parameters

  • string SendSingleNewsletter(string accessKey, int listID, string subject, string type, string content, string recipientEmail, Option[] options)
    • accessKey: access key obtained using the LoginFromId method
    • listID: list identifier. Lists and corresponding IDs can be obtained calling the GetLists Method
    • subject: subject of the email message
    • type: type of message text source (HTML, URL, FILE, TEXT, ID)
    • content: message text source, depending on the type:
      • type = HTML, content is the HTML code of the message
      • type = TEXT, content is the PLAIN-TEXT of the message (this value is deprecated and it is handled exactly as "HTML")
      • type = URL, content is the url from which to draw the HTML code of the message
      • type = FILE, content is a byte array from which to draw the HTML code of the message
      • type = ID, content is the identifier of the newsletter to be sent
    • recipientEmail: email address of the recipient. If not already subscribed, recipient will be automatically added to the subscribers of specified list (message is sent also in this case)
    • options: an array of key/value pairs for options setting. A subset of the options listed for the CreateNewsletter Method and SendNewsletter Method is available for this method as well.
      • note: a string containing notes about the message
      • dyn_fld: boolean value to enable/disable the use of dynamic fields in the message (dyn_fld=true, dyn_fld=false)
      • emb_img: boolean value to enable/disable the use of embedded images in the message (emb_img=true, emd_img=false)
      • link_track: boolean value to enable/disable the use of link tracking in the message (link_trcak=true, link_track=false). If link_track=true and no other option is specified among track_http, track_https, track_mailto, track_ftp, track_news, tracking of all protocols is activated. In order to disable a protocol, specify the corresponding parameter
      • track_http: boolean value to enable/disable the use of http protocol tracking in the message (track_http=true, track_http=false)
      • track_https: boolean value to enable/disable the use of HTTPS protocol tracking in the message (track_https=true, track_https=false)
      • track_mailto: boolean value to enable/disable the use of MAILTO protocol tracking in the message (track_mailto=true, track_mailto=false)
      • track_ftp: boolean value to enable/disable the use of FTP protocol tracking in the message (track_ftp=true, track_ftp=false)
      • track_news: boolean value to enable/disable the use of NEWS protocol tracking in the message (track_news=true, track_news=false)
      • link_params: a string allowing to specify additional parameters for tracked links
      • body_code: a string containing a personalized code for the <body> tag
      • header: a string containing a personalized code for the <header> tag
      • conf_msg: boolean value to mark the message used as a subscription confirmation
      • attach<nn>_data = base64 file encoding
      • attach<nn>_name = filename
      • 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
      • campo1… campo<nn> = you can indicate one or more personal data fields to be updated for the recipient of this message. They work exactly like as in the WS_MailUpSend.SendNewsletter, but referred to a single recipient: as a consequence, the character ";" is not required as a separator

If error code=0, the message will contain the ID of the sending

Sample SendSingleNewsletter Method

<errorDescription>Message sent to</errorDescription>
  • No labels


  1. Anonymous

    string recipientEmail description is missing between content and option sections.

    Can i send emails to unregistered users with this method?

    If not, is there a way to use SMTP+ functionality querying web service? i mean, can i pass my SMTP+ server a subject, a message, a destination address and have my email sent through SMTP+?

    Can u please post some code examples?

    1. Thanks for your message, we have updated this page adding the missing parameter. As you can see above, you can use this method also to send messages to new recipients (i.e. recipients that do not belong to the list of subscribers).

      In any case, SendSingleNewsletter is not recommended if you are planning to send a lot of transactional messages (i.e hundreds or thousands one-to-one messages per day, limits may vary, check out the page about best practices or contact support team to know more about limitations) and some runtime restrictions may be applied in case of abuse. 

      For transactional messages we recommend SMTP+ and we have recently added an example about how to send email using SMTP+ from your PHP application. Of course with SMTP+ you can specify almost any email parameter, your recipients, your message and send it directly with a speed that depends on the bandwidth of your MailUp account.

      For additional information please feel free to write an email to our support team.