-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
there is already a bug report and solution so possible to include it in the next update?
Undefined offset: 1 at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php#299
So, I've run into an issue if the username for the SMTP server doesn't have an "@domain.com" attached to it. The SMTP server I'm connecting to fails auth if you send it "username@domain.com" as the username and works if you use just "username".
However, if I do use just "username", the auth works and the mail goes through, but a notice gets thrown for "undefined offset" from this code, which tries to explode the string into an array based on the presence of "@":
Interestingly enough, if I change the "username" to just "username@" it actually works (auth works and mail is sent) and and there is no notice thrown.
So could a solution be to add a simple check there to see if there is a "@" present or not and then return the values accordingly (maybe $domain is null)?