if the username/password are too long - the current bas64 does return the result including a newline which makes the authentication to the SMTP server fail - the proposed change makes sure that the base64 is returned in a single line.
Tested with SendGrid SMPT and apikey - the suggested change fixes the described issue.
if the username/password are too long - the current bas64 does return the result including a newline which makes the authentication to the SMTP server fail - the proposed change makes sure that the base64 is returned in a single line.
Tested with SendGrid SMPT and apikey - the suggested change fixes the described issue.