Package | gulp-mail |
Description | Send mails with gulp |
Highly learnt from gulp-mailer (not available on npm)
- options: [object]
var mail = require('gulp-mail')
var smtpInfo = {
auth: {
user: '[email protected]',
pass: '123456'
},
host: 'smtp.163.com',
secureConnection: true,
port: 465
}
gulp.task('mail', function() {
return gulp.src('./mails/i-love-you.html')
.pipe(mail({
subject: 'Surprise!?',
to: [
'[email protected]'
],
from: 'Foo <[email protected]>',
smtp: smtpInfo
}))
})