SS
Size: a a a
SS
a
SS
a
S
S
a
a
a
S
SS
S
a
fs.readFile
совсемvar mailer = require('nodemailer');
mailer.SMTP = {
host: 'host.com',
port:587,
use_authentication: true,
user: 'you@example.com',
pass: 'xxxxxx'
};
mailer.send_mail({
sender: 'sender@sender.com',
to: 'dest@dest.com',
subject: 'Attachment!',
body: 'mail content...',
attachments: [{
'filename': 'attach.xml', // ◄ ◄ ◄ тут имя файла
'content': data // ◄ ◄ ◄ тут data - это xml в виде текста
}]
}, function(err, success) {
if (err) {
// Handle error
}
});
S
fs.readFile
совсемvar mailer = require('nodemailer');
mailer.SMTP = {
host: 'host.com',
port:587,
use_authentication: true,
user: 'you@example.com',
pass: 'xxxxxx'
};
mailer.send_mail({
sender: 'sender@sender.com',
to: 'dest@dest.com',
subject: 'Attachment!',
body: 'mail content...',
attachments: [{
'filename': 'attach.xml', // ◄ ◄ ◄ тут имя файла
'content': data // ◄ ◄ ◄ тут data - это xml в виде текста
}]
}, function(err, success) {
if (err) {
// Handle error
}
});
a
SS
a
a
S
АИ