send-mail-demo.js 502 Bytes
Newer Older
Leon's avatar
Leon committed
1 2 3
var mail = require('topsin.mail');
var error = require('topsin.error'); 
var err = mail.sendMail({
l2m2's avatar
l2m2 committed
4 5 6
    host:'10.3.1.251',
    port: 25,
    // auth_method:mail.AuthMethod.LOGIN,
l2m2's avatar
l2m2 committed
7
    connection_type:mail.ConnectionType.TCP,
l2m2's avatar
l2m2 committed
8 9
    from:'wyh@utpcb.com',
    password: '123456',
Leon's avatar
Leon committed
10
    to:'leon.li@topibd.com',
l2m2's avatar
l2m2 committed
11
    subject:'TopJS Mail Test From Local SMTP Port 25',
Leon's avatar
Leon committed
12 13 14
    content:'topjs mail test body18',
    connection_timeout: 5000,
    response_timeout: 20000
Leon's avatar
Leon committed
15 16 17 18
});
if (err.isValid()) {
    print(err.text());
}