You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nodemailer show mail sent successfully,but not received in hotmail or gmail, see debug information:
[2019-12-25 20:07:21] DEBUG Creating transport: nodemailer (6.4.2; +https://nodemailer.com/; SMTP/6.4.2[client:6.4.2])
[2019-12-25 20:07:21] DEBUG Sending mail using SMTP/6.4.2[client:6.4.2]
[2019-12-25 20:07:21] DEBUG [8iKNVLchDJw] Resolved smtp.ethereal.email as 178.32.207.71 [cache miss]
[2019-12-25 20:07:21] INFO [8iKNVLchDJw] Connection established to 178.32.207.71:587
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] Connection upgraded with STARTTLS
[2019-12-25 20:07:22] DEBUG [8iKNVLchDJw] SMTP handshake finished
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] User "[email protected]" authenticated
[2019-12-25 20:07:22] INFO Sending message [email protected] to [email protected]
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] <318 bytes encoded mime message (source size 315 bytes)>
[2019-12-25 20:07:22] DEBUG [8iKNVLchDJw] Closing connection to the server using "end"
Email has been sent https://ethereal.email/message/XgPBeQXHOwzashBtXgPBeiwGigyp0rYgAAAAAR.aTWqijqF4tGifeFS4.ik
POST /sendmail 200 2241.633 ms - 359
this is the code:
const sendMail = (callback) => {
console.log('send mail')
let testAccount ;
nodemailer.createTestAccount((err, account) => {
if (err) {
console.error('Failed to create a testing account');
console.error(err);
return process.exit(1);}
else{
console.log('testAccount' + account);
console.log('Credentials obtained, sending message...');
const transporter = nodemailer.createTransport({
name: '127.0.0.1',
host: account.smtp.host,
port: account.smtp.port,
secure: account.smtp.secure,
auth: {
user: account.user,
pass: account.pass
},
// sender address
headers: {
'X-Laziness-level': 1000 // just an example header, no need to use this
},
logger: true,
debug: false // include SMTP traffic in the logs
});
const mailOptions = {
from:account.user,
to: "[email protected]",
subject: "Contact Request",
html: "<h1>And here is the place for HTML</h1>"
};
transporter.sendMail(mailOptions, callback);
}
});
}
router.post("/",(req,res)=>{
console.log("request came");
//let user = req.body;
//console.log(user)
sendMail( (err, info)=>{
if (err) {
debugger;
console.log(err);
res.status(400);
res.send({ error: "Failed to send email" });
}
else{
console.log("Email has been sent");
console.log(nodemailer.getTestMessageUrl(info));
res.send(info);
}
});
});
module.exports = router;
The text was updated successfully, but these errors were encountered:
nodemailer show mail sent successfully,but not received in hotmail or gmail, see debug information:
[2019-12-25 20:07:21] DEBUG Creating transport: nodemailer (6.4.2; +https://nodemailer.com/; SMTP/6.4.2[client:6.4.2])
[2019-12-25 20:07:21] DEBUG Sending mail using SMTP/6.4.2[client:6.4.2]
[2019-12-25 20:07:21] DEBUG [8iKNVLchDJw] Resolved smtp.ethereal.email as 178.32.207.71 [cache miss]
[2019-12-25 20:07:21] INFO [8iKNVLchDJw] Connection established to 178.32.207.71:587
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] Connection upgraded with STARTTLS
[2019-12-25 20:07:22] DEBUG [8iKNVLchDJw] SMTP handshake finished
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] User "[email protected]" authenticated
[2019-12-25 20:07:22] INFO Sending message [email protected] to [email protected]
[2019-12-25 20:07:22] INFO [8iKNVLchDJw] <318 bytes encoded mime message (source size 315 bytes)>
[2019-12-25 20:07:22] DEBUG [8iKNVLchDJw] Closing connection to the server using "end"
Email has been sent
https://ethereal.email/message/XgPBeQXHOwzashBtXgPBeiwGigyp0rYgAAAAAR.aTWqijqF4tGifeFS4.ik
POST /sendmail 200 2241.633 ms - 359
this is the code:
const sendMail = (callback) => {
console.log('send mail')
let testAccount ;
nodemailer.createTestAccount((err, account) => {
if (err) {
console.error('Failed to create a testing account');
console.error(err);
return process.exit(1);}
}
router.post("/",(req,res)=>{
console.log("request came");
//let user = req.body;
//console.log(user)
sendMail( (err, info)=>{
if (err) {
debugger;
console.log(err);
res.status(400);
res.send({ error: "Failed to send email" });
}
else{
console.log("Email has been sent");
console.log(nodemailer.getTestMessageUrl(info));
res.send(info);
}
});
});
module.exports = router;
The text was updated successfully, but these errors were encountered: