cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

Bookings will not send emails

Open marcoantonio123456 opened this issue 1 year ago • 2 comments

Issue Summary

Currently, I will not receive any emails on a fresh installation of Cal on my server. I tried multiple SMTP credentials even Sendgrid but nothing allows me to connect the application to SMTP. I have tested the exact credentials on other applications with successful results.

Steps to Reproduce

  1. Tested a booking
  2. checked logs
 SEND_BOOKING_CONFIRMATION_ERROR Error: Invalid login: 535 5.7.3 Authentication unsuccessful [BL1PR13CA0382.namprd13.prod.outlook.com 20>
	     at SMTPConnection._formatError (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:787:19)
	     at SMTPConnection._actionAUTHComplete (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:1539:34)
	     at SMTPConnection.<anonymous> (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:1493:18)
	     at SMTPConnection._processResponse (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:950:20)
	     at SMTPConnection._onData (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:752:14)
	     at SMTPConnection._onSocketData (/opt/cal.com/node_modules/nodemailer/lib/smtp-connection/index.js:191:44)
	     at TLSSocket.emit (node:events:513:28)
	     at TLSSocket.emit (node:domain:552:15)
	     at addChunk (node:internal/streams/readable:324:12)
	     at readableAddChunk (node:internal/streams/readable:297:9)
	     at Readable.push (node:internal/streams/readable:234:10)
	     at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
	     at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
	   code: 'EAUTH',
	   response: '535 5.7.3 Authentication unsuccessful [BL1PR13CA0382.namprd13.prod.outlook.com 2023-04-17T03:01:04.413Z 08DB3EA1A25D74A5]',
	   responseCode: 535,
	   command: 'AUTH LOGIN'
	 }
	 sendEmail Error: Invalid login: 535 5.7.3 Authentication unsuccessful [BL1PR13CA0382.namprd13.prod.outlook.com 2023-04-17T03:01:04.413Z>
  1. Tried multiple services of SMTP servers, Mailtrap, Mailgun, Sendgrid nothing works

Technical details

  • Node.js version v18.14.2
  • Anything else that you think could be an issue. I am also dealing with
    SyntaxError  Unexpected token < in JSON at position 0
    
    Not sure if these are related in any way, but I would love any help

marcoantonio123456 avatar Apr 17 '23 03:04 marcoantonio123456

@marcoantonio123456 Maybe check the following:

  1. Email provider password/token is correct
  2. If it doesn't work with the actual standard password, try to create an "App Password" (Gmail provides App Passwords, which need to be created specifically for applications - https://support.google.com/accounts/answer/185833?hl=en).

I was facing the same issue kinda in one of my applications, fixed using #.2.

harshmange44 avatar Apr 17 '23 20:04 harshmange44

thank you, this actually was the only thing that worked. Tried every other STMP relay service but gmail was the only thing that worked!

marcoantonio123456 avatar May 06 '23 19:05 marcoantonio123456