Commits

Dustin Shields-Cloues committed 96a6b24

Added return path customization to sending calls

Comments (0)

Files changed (3)

     port:   443,
     prefix: '/api/1.0/',
     method: 'POST',
-    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.29'}
+    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.30'}
 }
 
 class exports.Mandrill
          - bcc_address {String} an optional address to receive an exact copy of each recipient's email
          - tracking_domain {String} a custom domain to use for tracking opens and clicks instead of mandrillapp.com
          - signing_domain {String} a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
+         - return_path_domain {String} a custom domain to use for the messages's return-path
          - merge {Boolean} whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.
          - global_merge_vars {Array} global merge variables to use for all recipients. You can override these per recipient.
              - global_merge_vars[] {Object} a single global merge variable
          - bcc_address {String} an optional address to receive an exact copy of each recipient's email
          - tracking_domain {String} a custom domain to use for tracking opens and clicks instead of mandrillapp.com
          - signing_domain {String} a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
+         - return_path_domain {String} a custom domain to use for the messages's return-path
          - merge {Boolean} whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.
          - global_merge_vars {Array} global merge variables to use for all recipients. You can override these per recipient.
              - global_merge_vars[] {Object} a single global merge variable
     @option params {Boolean} async enable a background sending mode that is optimized for bulk sending. In async mode, messages/sendRaw will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
     @option params {String} ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
     @option params {String} send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately.
+    @option params {String} return_path_domain a custom domain to use for the messages's return-path
     @param {Function} onsuccess an optional callback to execute when the API call is successfully made
     @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     ###
         params["async"] ?= false
         params["ip_pool"] ?= null
         params["send_at"] ?= null
+        params["return_path_domain"] ?= null
 
         @master.call('messages/send-raw', params, onsuccess, onerror)
 
     method: 'POST',
     headers: {
       'Content-Type': 'application/json',
-      'User-Agent': 'Mandrill-Node/1.0.29'
+      'User-Agent': 'Mandrill-Node/1.0.30'
     }
   };
 
              - bcc_address {String} an optional address to receive an exact copy of each recipient's email
              - tracking_domain {String} a custom domain to use for tracking opens and clicks instead of mandrillapp.com
              - signing_domain {String} a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
+             - return_path_domain {String} a custom domain to use for the messages's return-path
              - merge {Boolean} whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.
              - global_merge_vars {Array} global merge variables to use for all recipients. You can override these per recipient.
                  - global_merge_vars[] {Object} a single global merge variable
              - bcc_address {String} an optional address to receive an exact copy of each recipient's email
              - tracking_domain {String} a custom domain to use for tracking opens and clicks instead of mandrillapp.com
              - signing_domain {String} a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
+             - return_path_domain {String} a custom domain to use for the messages's return-path
              - merge {Boolean} whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.
              - global_merge_vars {Array} global merge variables to use for all recipients. You can override these per recipient.
                  - global_merge_vars[] {Object} a single global merge variable
         @option params {Boolean} async enable a background sending mode that is optimized for bulk sending. In async mode, messages/sendRaw will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
         @option params {String} ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
         @option params {String} send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately.
+        @option params {String} return_path_domain a custom domain to use for the messages's return-path
         @param {Function} onsuccess an optional callback to execute when the API call is successfully made
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
 
     Messages.prototype.sendRaw = function(params, onsuccess, onerror) {
-      var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+      var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
       if (params == null) {
         params = {};
       }
       if ((_ref5 = params["send_at"]) == null) {
         params["send_at"] = null;
       }
+      if ((_ref6 = params["return_path_domain"]) == null) {
+        params["return_path_domain"] = null;
+      }
       return this.master.call('messages/send-raw', params, onsuccess, onerror);
     };
 
   "author": "Mandrill Devs <community@mandrill.com> (http://mandrill.com)",
   "name": "mandrill-api",
   "description": "The official API client for the Mandrill email as a service product.",
-  "version": "1.0.29",
+  "version": "1.0.30",
   "homepage": "https://bitbucket.org/mailchimp/mandrill-api-node",
   "repository": {
     "type": "git",