I am using mrt:meteor-nodemailer package to tryning to send email with attachement.
var smtpTransport = nodemail.createTransport("SMTP", {
service : "Gmail",
maxConnections : 1,
maxMessages : 1,
auth : {
pass : "mypass"
}
});
function email(adresse, subject, content) {
// setup e-mail data with unicode symbols
var mailOptions = {
to : adresse, // list of receivers
subject : subject, // Subject line
html : content // html body
};
// send mail with defined transport object
smtpTransport.sendMail(mailOptions, function(error, response) {
if (error) {
console.log(error);
} else {
console.log("Message sent: " + response.message);
}
smtpTransport.close();
});
}
Th error on loading the page : Uncaught TypeError: Cannot read property 'createTransport' of undefined