@@ -17,37 +17,37 @@ The `Mail` class encapsulates connection settings and can be used as a
17
17
safe, high-level mailer.
18
18
19
19
var mail = require('mail').Mail({
20
- host: 'smtp.gmail.com',
21
-
22
- password: '**password**'
23
- });
20
+ host: 'smtp.gmail.com',
21
+
22
+ password: '**password**'
23
+ });
24
24
25
25
Use the mailer to send messages:
26
26
27
27
mail.message({
28
-
29
-
30
- subject: 'Hello from Node.JS'
31
- })
32
- .body('Node speaks SMTP!')
33
- .send(function(err) {
34
- if (err) throw err;
35
- console.log('Sent!');
36
- });
28
+
29
+
30
+ subject: 'Hello from Node.JS'
31
+ })
32
+ .body('Node speaks SMTP!')
33
+ .send(function(err) {
34
+ if (err) throw err;
35
+ console.log('Sent!');
36
+ });
37
37
38
38
## Mail(options) ##
39
39
40
40
Create a new mailer that can be used to send messages. Common options
41
41
include:
42
42
43
- + ` port ` : server listens on this port (default: 587 or 25)
44
43
+ ` host ` : server hostname
45
44
+ ` username ` : user for server authentication
46
45
+ ` password ` : password for server authentication,
47
46
48
47
Other options:
49
48
50
49
+ ` secure ` : ` true ` , ` false ` , or crypto credentials (default: ` true ` )
50
+ + ` port ` : server listens on this port (default: 587 or 25)
51
51
+ ` domain ` : the domain of the sender (default: ` os.hostname() ` )
52
52
+ ` mimeTransport ` : ` 7BIT ` or ` 8BITMIME ` (default: ` 8BITMIME ` )
53
53
@@ -85,7 +85,9 @@ version `v0.4.3`. A working subset of these RFCs are supported:
85
85
+ [ SMTP Transport Layer Security] ( http://tools.ietf.org/html/rfc3207 )
86
86
+ [ 8-bit MIME Transport] ( http://tools.ietf.org/html/rfc6152 )
87
87
88
- There is not currently support for MIME.
88
+ There is not currently direct support for multipart messages or
89
+ attachments, although ` node-mail ` will send messages in this format if
90
+ they're build manually.
89
91
90
92
[ 1 ] : http://qmail.org/top.html
91
93
[ 2 ] : http://mail.google.com/support/bin/answer.py?hl=en&answer=13287
0 commit comments