Reputation: 46
I have been trying for quite some time to get Nodemailer to successfully send emails using my Zoho Mail account, and I always seem to be getting a 535 Authentication Error despite the solutions I try.
Here is the relevant information about the issue:
I am not sure what else I can do to get the issue solved and I would be appreciative of any help. Thank you in advance.
Upvotes: 0
Views: 480
Reputation: 849
If you're from India, use smtppto.zoho.in
, it would look something like this
const transporter: Transporter = nodemailer.createTransport({
service: "smtppro.zoho.in",
host: "smtppro.zoho.in",
port: 465,
secure: true,
auth: {
user: process.env.NEXT_PUBLIC_ZOHO_MAIL_ID,
pass: process.env.NEXT_PUBLIC_ZOHO_MAIL_PASSWORD,
},
});
Upvotes: 1
Reputation: 46
It turned out that a professional Zoho mail account may need a different host domain. In my case, this was smtppro.zoho.eu
.
So I had to use this in the transported created with node-mailer.
const transporter = nodemailer.createTransport({
host: 'smtppro.zoho.eu',
service: 'smtppro.zoho.eu',
secure: true,
port: 465,
auth: {
user: [redacted],
pass: [redacted],
},
});
Upvotes: 0