Child pages
  • WS_MailUpSend.SendNewsletterFast
Skip to end of metadata
Go to start of metadata

Creates and sends a message via a unique call

The "Fast" suffix in the method's name means that you can do two actions with a single call, but there is no performance improvement by using it. Instead, you must pay attention to the very tight rate limits of this method


Method parameters

  • string SendNewsletterFast(string accessKey, int listID, string subject, string type, string content, 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 message
    • type: type of message text (HTML, URL, FILE, TEXT)
    • 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
    • options: an array of key/value pairs for options setting. All the options listed for the WS_MailUpSend.CreateNewsletter and WS_MailUpSend.SendNewsletter are available for this method as well.

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

SOAP Examples


SOAP Request (type = URL, send_to = GROUPS)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
   <soap:Header/>
   <soap:Body>
      <ws:SendNewsletterFast>
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2s</ws:accessKey>
         <ws:listID>48</ws:listID>
         <ws:subject>Hello [FirstName], your subscription is active</ws:subject>
         <ws:type>URL</ws:type><ws:content>http://www.mailup.it</ws:content>
          <ws:options>
            <ws:Option> <ws:Key>note</ws:Key> <ws:Value>my notes</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>dyn_fld</ws:Key><ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>emb_img</ws:Key><ws:Value>false</ws:Value> </ws:Option>               
	    <ws:Option> <ws:Key>link_track</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_http</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>track_https</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>track_mailto</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_ftp</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_news</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>link_params</ws:Key> <ws:Value>""</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>conf_msg</ws:Key> <ws:Value>false</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>from_name</ws:Key> <ws:Value>Your Dealer</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>from_email</ws:Key> <ws:Value>jimmy@example.com</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>clear_stats</ws:Key> <ws:Value>false</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>send_to</ws:Key> <ws:Value>GROUPS</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>recipients</ws:Key> <ws:Value>347</ws:Value> </ws:Option>
          </ws:options>
      </ws:SendNewsletterFast>
   </soap:Body>
</soap:Envelope>
SOAP Request (type = HTML, send_to = RECIPIENTS)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
   <soap:Header/>
   <soap:Body>
      <ws:SendNewsletterFast>
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2s<</ws:accessKey>
         <ws:listID>48</ws:listID>     
         <ws:subject>Hello [FirstName], your subscription is active</ws:subject>
         <ws:type>HTML</ws:type>
         <ws:content>Hello [FirstName] [LastName] &lt;/br &gt; your request has been approved and your customer code is 0123456789 </ws:content>
          <ws:options>
            <ws:Option> <ws:Key>note</ws:Key> <ws:Value>my notes</ws:Value> </ws:Option>
            <ws:Option><ws:Key>dyn_fld</ws:Key><ws:Value>true</ws:Value></ws:Option>
            <ws:Option><ws:Key>emb_img</ws:Key><ws:Value>false</ws:Value></ws:Option>            
	    <ws:Option> <ws:Key>link_track</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_http</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>track_https</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>track_mailto</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_ftp</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>track_news</ws:Key> <ws:Value>true</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>link_params</ws:Key> <ws:Value>""</ws:Value> </ws:Option>	    
            <ws:Option> <ws:Key>conf_msg</ws:Key> <ws:Value>false</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>from_name</ws:Key> <ws:Value>Your Dealer</ws:Value> </ws:Option>
	    <ws:Option> <ws:Key>from_email</ws:Key> <ws:Value>jimmy@example.com</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>clear_stats</ws:Key> <ws:Value>false</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>send_to</ws:Key> <ws:Value>RECIPIENTS</ws:Value> </ws:Option>
            <ws:Option> <ws:Key>recipients</ws:Key> <ws:Value>john@example.com;mary@mailup.com</ws:Value> </ws:Option>
          </ws:options>
      </ws:SendNewsletterFast>
   </soap:Body>
</soap:Envelope>
SOAP Response
<SendNewsletterFastResult>
<errorCode>0</errorCode>
<errorDescription>0</errorDescription>
<listID>1</listID>
<newsletterID>1</newsletterID>
<deliveryID>125</deliveryID>
<deliveryStatus>Sending in progress</deliveryStatus>
</SendNewsletterFastResult> 
  • No labels

2 Comments

  1. Anonymous

    Using this method recive a generic error 230 : "Error creating newsletter: Object reference not set to an instance of an object."

    The array passing to the method is :

    $sendnewsletterfast = array("accessKey" => $this->accessKey, <-- Corrent ... used for other method call
                                       "listID" => $this->id_lista, <-- Verified and not NULL
                                       "subject" => 'Test email',
                                       "type" => "URL",
                                       "content" => $url, <-- Passing from the function ... Verified and not NULL
                                       "options" => array(
            
                                                array("Key" => "note","Value"  => $note), <-- Passing from the function ... Verified and not NULL
                                                array("Key" => "dyn_fld","Value"  => false),
                                                array("Key" => "emb_img","Value"  => false),
                                                array("Key" => "link_track","Value"  => true),
                                                array("Key" => "track_http","Value"  => true),
                                                array("Key" => "track_https","Value"  => true),
                                                array("Key" => "track_mailto","Value"  => true),
                                                array("Key" => "track_ftp","Value"  => true),
                                                array("Key" => "track_news","Value"  => true),
                                                array("Key" => "link_params","Value"  => ""),
                                                array("Key" => "body_code","Value"  => ""),
                                                array("Key" => "header","Value"  => ""),
                                                array("Key" => "conf_msg","Value"  => false),
                                                array("Key" => "template","Value"  => ""),                                                                                        
                                                
                                                array("Key" => "from_email","Value"  => ""),
                                                array("Key" => "from_name","Value"  => ""),
                                                array("Key" => "clear_stats","Value"  => false),
                                                array("Key" => "send_to","Values"  => "GROUPS"),
                                                array("Key" => "recipients","Value"  => $this->id_group), <-- Verified and not NULL
                                            )
                                       );

     

    The array is corrent passing to the method and the value of listID and GroupId(passed to recipients) is according to console .

    What is the possible cause of error ??

    Missing arguments ??

  2. Error 230 is usually returned when one or more field is specified with a wrong format. A couple of examples have been added to help you with the right settings.

    In addition, I recommend the following settings:

    • list ID and group ID shall be integer values that correspond to an existing list and to a group that belongs to the specified list
    • when required, an integer value has to be set in "template" field (in your case you could avoid this field) 
    • ensure that URL is complete (e.g. http://www.mailup.com is correct, www.mailup.com is wrong)
    • if you don't need a parameter, don't add empty options to the request, in your case I suggest to avoid "from_email", "from_name", "header" "body_code", "template

    Finally, I suggest to contact MailUp support team If these suggestions are not enough to solve your issue.

    Regards