blob: 5bdbbf9f11e50d78890cb597ab8aec26a251a51c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
"use strict";
var querystring = require('querystring');
var https = require('https');
var _ = require('underscore');
function SmtpapiHeaders() {
}
function EmailHeaders() {
}
function Email(params) {
/*
* Default parameters for sending mail
*/
var default_mail_params = {
to: [],
from: '',
smtpapi: new SmtpapiHeaders(),
subject: '',
text: '',
html: '',
bcc: [],
replyto: '',
date: new Date(),
files: [],
headers: new EmailHeaders()
};
this.params = _.extend(default_mail_params, params);
}
/*
* Validates an email. This is used before sending, but
* can still be invoked programatically
*
* @return {Boolean} The result of the validation
*/
Email.prototype.validate = function() {
return false;
}
module.exports = Email;
|