send-mail-demo.js 545 Bytes
Newer Older
Leon's avatar
Leon committed
1 2
var mail = require('topsin.mail');
var error = require('topsin.error'); 
Leon's avatar
Leon committed
3
var config = require("./config");
Leon's avatar
Leon committed
4
var err = mail.sendMail({
Leon's avatar
Leon committed
5 6
    host:'10.90.78.10',
    port: 443,
Leon's avatar
Leon committed
7
    auth_method:mail.AuthMethod.LOGIN,
Leon's avatar
Leon committed
8 9 10
    connection_type:mail.ConnectionType.SSL,
    from:'SLPLaserCtable.CCQ@cn.ats.net',
    password: config.mail_password,
Leon's avatar
Leon committed
11 12
    to:'leon.li@topibd.com',
    subject:'topjs mail test title',
Leon's avatar
Leon committed
13 14 15
    content:'topjs mail test body18',
    connection_timeout: 5000,
    response_timeout: 20000
Leon's avatar
Leon committed
16 17 18 19
});
if (err.isValid()) {
    print(err.text());
}