skip to Main Content
var transporter = nodemailer.createTransport({
 name:"www.rolester.com",
 service:"smtp",
 port: 27017,
 auth: {
   user: "[email protected]",
   pass: "alandiv09"
   }

when i try this code i get his error

Error: Greeting never received

and when i change the port to my domain email port which is 587 i get this error

Error: connect ECONNREFUSED 127.0.0.1:587

and when i try to turn secure to true like that .secure : true

i get this error

[Error: 68390000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:wsdepsopensslopensslsslrecordssl3_record.c:355:

] any solution ???

2

Answers


  1. Chosen as BEST ANSWER

    I found out that that is not a smtp server so it can't send emails


  2. const transporter = nodemailer.createTransport({
            host: process.env.EMAIL_HOST,
            port: process.env.HOST_PORT,
            auth: {
                user: process.env.EMAIL_USER,
                pass: process.env.EMAIL_PASS,
            },
            tls: {
                rejectUnauthorized: false
            }
        })
    
    use this format
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search