summaryrefslogtreecommitdiffstats
path: root/lib/email.js
diff options
context:
space:
mode:
authorscottmotte <scott@scottmotte.com>2013-12-18 17:03:28 -0800
committerscottmotte <scott@scottmotte.com>2013-12-18 17:03:28 -0800
commit4dcb0c3d12f4898dd2b5991dacb3d1b5a9b4a400 (patch)
treea1b8a9233929cb765a35c32384b3df2a893b115f /lib/email.js
parenta8b066022f79cb636a17d30001a781f8686a3447 (diff)
downloadsendgrid-nodejs-4dcb0c3d12f4898dd2b5991dacb3d1b5a9b4a400.zip
sendgrid-nodejs-4dcb0c3d12f4898dd2b5991dacb3d1b5a9b4a400.tar.gz
sendgrid-nodejs-4dcb0c3d12f4898dd2b5991dacb3d1b5a9b4a400.tar.bz2
Cleans up
Diffstat (limited to 'lib/email.js')
-rw-r--r--lib/email.js74
1 files changed, 0 insertions, 74 deletions
diff --git a/lib/email.js b/lib/email.js
index c895de4..8617ffc 100644
--- a/lib/email.js
+++ b/lib/email.js
@@ -52,33 +52,18 @@ function Email(params) {
}
}
-/**
- * This method sets the headers on an email, if the value passed in is an object.
- *
- * @param {object} val An object of custom headers
- */
Email.prototype.setHeaders = function(val) {
if (_.isObject(val)) {
this.headers = val;
}
};
-/**
- * This method will add a header, or multiple headers, to an email.
- *
- * @param {object} val An object of custom headers
- */
Email.prototype.addHeaders = function(val) {
if (_.isObject(val)) {
_.extend(this.headers, val);
}
};
-/**
- * This method is a proxy for adding a to address to the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addTo
- */
Email.prototype.addTo = function(to) {
this.smtpapi.addTo(to);
};
@@ -99,105 +84,46 @@ Email.prototype.setHtml = function(html) {
this.html = html;
};
-/**
- * This method is a proxy for the add sub val on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addSubVal
- */
Email.prototype.addSubVal = function(key, val) {
this.smtpapi.addSubVal(key, val);
};
-/**
- * This method is a proxy for setting unique args on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.setUniqueArgs
- */
Email.prototype.setUniqueArgs = function(val) {
this.smtpapi.setUniqueArgs(val);
};
-/**
- * This method is a proxy for adding unique args on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addUniqueArgs
- */
Email.prototype.addUniqueArgs = function (val) {
this.smtpapi.addUniqueArgs(val);
};
-/**
- * This method is a proxy for setting categories on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.setCategory
- */
Email.prototype.setCategory = function(val) {
this.smtpapi.setCategory(val);
};
-/**
- * This method is a proxy for adding categories on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addCategory
- */
Email.prototype.addCategory = function(val) {
this.smtpapi.addCategory(val);
};
-/**
- * This method is a proxy for setting sections on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.setSection
- */
Email.prototype.setSection = function(val) {
this.smtpapi.setSection(val);
};
-/**
- * This method is a proxy for adding sections on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addSection
- */
Email.prototype.addSection = function(val) {
this.smtpapi.addSection(val);
};
-/**
- * This method is a proxy for adding a filter setting on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.addFilterSetting
- */
Email.prototype.addFilterSetting = function(filter, setting, val) {
this.smtpapi.addFilterSetting(filter, setting, val);
};
-/**
- * This method is a proxy for setting a filter setting on the SmtpapiHeaders
- *
- * @see SmtpapiHeaders.setFilterSetting
- */
Email.prototype.setFilterSetting = function(filters) {
this.smtpapi.setFilterSetting(filters);
};
-/**
- * This method adds a file to the email object as an attachment
- * It uses the FileHandler object.
- *
- * @param {object} file_object The file object
- *
- * @see FileHandler
- */
Email.prototype.addFile = function(file_object) {
this.files.push(new FileHandler(file_object));
};
-/**
- * This method returns the email object is a format to be consumed by the SendGrid.web
- * using the web api
- *
- * @see SendGrid.web
- */
Email.prototype.toWebFormat = function() {
var web = {
to : this.to,