• Как отправить email с mail.ru на gmail.com?

    @Hrant1998 Автор вопроса
    5e5f9feed228d341057948.png

    [2020-03-04 12:33:27] INFO  [ao1R5pXeoL4] Connection upgraded with STARTTLS
    [0] [2020-03-04 12:33:27] DEBUG [ao1R5pXeoL4] SMTP handshake finished
    [0] [2020-03-04 12:33:27] INFO  Sending message <7c24b069-5dc7-0178-40a1-8e34a2093b3d@icn-solutions.nl> to <aydinyan98@bk.ru>
    [0] [2020-03-04 12:33:32] DEBUG [ao1R5pXeoL4] Closing connection to the server using "end"
    [0] [2020-03-04 12:33:32] ERROR Send error for <7c24b069-5dc7-0178-40a1-8e34a2093b3d@icn-solutions.nl>: Can't send mail - all recipients were rejected: 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain
    [0] [2020-03-04 12:33:32] ERROR Send Error: Can't send mail - all recipients were rejected: 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain
    [0] error sending email: Error: Can't send mail - all recipients were rejected: 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain
    [0] [2020-03-04 12:33:32] INFO  [ao1R5pXeoL4] Connection closed
  • Как отправить email с mail.ru на gmail.com?

    @Hrant1998 Автор вопроса
    const config = {
    mailserver: {
    host: 'smtp.mail.ru',
    port: 465,
    secure: 'SSL',
    auth: {
    user: "example@mail.ru",
    pass: '*******'
    },

    logger: true,
    debug: true,

    },
    mail: {
    from: "example@mail.ru"
    to: 'example2@gmail.com', // send email in gmail
    subject: "**********",
    text: '**********',
    },
    };
    transporter.sendMail(mailOptions, function (error, info) {

    if (error) {
    console.log('sending email: ' + error);
    } else {
    console.log('email sent' + info.response);
    }
    });

    Таким образом я могу отправить письмо только пользователем mail.ru , но не могу отправить на gmail.com