N
N
Nikita2020-12-30 19:07:00
Mail server
Nikita, 2020-12-30 19:07:00

What mail service should be specified for Yandex in nodemailer?

There is mail that is tied to the [email protected] domain. The documentation for the nodemailer package says that you need to specify the mail service and account data.

For google mail it looks like this

const transporter = nodemailer.createTransport({
        service: 'gmail',
        auth: {
            user: '[email protected]',
            pass: 'yourpassword'
        }
    })


And what will the service field for Yandex look like?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mahmudchon, 2020-12-30
@Prynik

You can specify as Yandex , it is in the list - https://nodemailer.com/smtp/well-known/
Also, such an implementation, in case there is no office. support.

const transporter = nodemailer.createTransport({
    host: "smtp.yandex.ru",
    port: 465,
    secure: true, // true for 465, false for other ports
    auth: {
      user: "user", // generated ethereal user
      pass: "pass" // generated ethereal password
    }
  });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question