Allow Encrypted No Auth SMTP

OS Name/Version: Ubuntu 22.04

Product Name/Version: AMP Release “Decadeus”
v2.4.2, built 21/02/2023 11:49

Problem Description:

Cannot send email unauthenticated while using SSL. I am using IP address authentication on my Google Workspace account, so no auth is needed, but if I turn on SSL it seems that it tries to send authentication information no matter what, which fails because I haven’t entered any.

Debug Logs:

[07:59:04] [EmailSender:xxxxxxxxx Debug] : Unable to send email: System.Net.Mail.SmtpException: Message could not be sent. ---> System.IO.IOException: Connection closed
  at System.Net.Mail.SmtpClient.Read () [0x000bd] in <b0f2d15c0b3e4af68978af038d7553b4>:0
  at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <b0f2d15c0b3e4af68978af038d7553b4>:0
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00050] in <b0f2d15c0b3e4af68978af038d7553b4>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00084] in <b0f2d15c0b3e4af68978af038d7553b4>:0
   --- End of inner exception stack trace ---
  at System.Net.Mail.SmtpClient+<>c__DisplayClass90_0.<SendAsync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) [0x0002c] in <b0f2d15c0b3e4af68978af038d7553b4>:0
  at System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) [0x0000a] in <b0f2d15c0b3e4af68978af038d7553b4>:0
  at System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) [0x0000e] in <b0f2d15c0b3e4af68978af038d7553b4>:0
--- End of stack trace from previous location where exception was thrown ---

  at EmailSenderPlugin.PluginMain.SendMail (System.String To, System.String Subject, System.String Message, System.Net.Mail.MailPriority Priority) [0x0013f] in <9c6d153447774c429f03f6f54fdbc422>:0
[07:59:04] [Core:topoftheamptoya Warning] : Slow method invocation: TestSMTPSettings took 10132ms to complete.
[07:59:04] [Core:topoftheamptoya Warning] : Slow response: EmailSenderPlugin.TestSMTPSettings took 10132ms to complete.

Steps to reproduce:

Actions taken to resolve so far:
seems to be a code oversight, so not much I can do. I have tested without SSL on port 25, and emails work beautifully.

Tested all available relay ports, 25, 465 and 587.

The stack trace unfortunately doesn’t tell me anything useful - all it tells me is that the SMTP server closed the connection, nothing about why. Leaving the username and password empty should be fine for this situation - but I’ve never tested unauthenticated SMTP.

I’ve made a minor change to explicitly not try and use any credentials if the username is empty, but don’t have a practical means of validating it so this is a blind change.

1 Like

Hey thanks man, yeah I didn’t think it had anything useful either.

I’ll give it a shot and report back!

Appreciate your time!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.