net-smtp icon indicating copy to clipboard operation
net-smtp copied to clipboard

Missing user name

Open RalphAtHamburg opened this issue 1 year ago • 4 comments

After upgrading from v0.4.0.1 we got the following error:

ArgumentError (SMTP-AUTH requested but missing user name)

ruby 3.3.0 rails 7.1.3.2

RalphAtHamburg avatar Apr 08 '24 12:04 RalphAtHamburg

Experiencing the same issue. Using plain authentication without user_name or password gives the same error. Setting these values as empty strings gets me pass the error but will not let me connect to the SMTP we are using.

If we skip setting the authentication to plain it works. Is there a mention of this that i missed?

ruby 3.3.1 rails 7.0.8.3

svenne87 avatar May 28 '24 06:05 svenne87

The commit c02ce7965b00533dcafb523ebf418d596d302ab0 is the corresponding change, I think. With that change the arguments are validated when authtype is given. Reading the RFC 4616 (The PLAIN Simple Authentication and Security Layer (SASL) Mechanism) one might argue that this is not an issue but a user and secret are required when using the :plain authtype.

Our solution (using Rails) was to remove the authentication: :plain from the smtp_settings, like svenne87 already suggested.

einjohn avatar Oct 01 '24 16:10 einjohn

Thanks,, it was our fault as we have nouser or sevret. Removing the authentication: :plain is the solution.

RalphAtHamburg avatar Oct 02 '24 12:10 RalphAtHamburg