New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non meaningful error when password is incorrect #96
Comments
Can you say what the special character is? You could try something like this: AuthString = base64:encode(io_lib:format("\0~s\0~s", [Username, Password])), |
To replace this line: https://github.com/Vagabond/gen_smtp/blob/master/src/gen_smtp_client.erl#L404 I mean |
I'm getting the following error:
The password was generated by 1Password so it contains |
Sorry, I should have tested it. Try this: AuthString = base64:encode(list_to_binary(io_lib:format("\0~s\0~s", [Username, Password]))), |
It's now rejecting the password twice and then I get an error tuple:
|
Is it possible to give me a credential on your account for testing? |
You can create a free account at https://sendgrid.com/, comes with 12k emails free. That's probably the simplest, otherwise happy to figure out a way to give you credentials (pgp?) |
I will give it a try. |
Ugh, they want to validate my 'company' and a bunch of other nonsense, which I don't really have. |
Ah crap, do you have a pgp key (or a keybase.io account)? |
|
Ok, so I got the credentials, but I can't authenticate to their SMTP server with the credentials using their example here: I get the same |
Ok, my sendgrid account got activated (I have no idea why). If I use the username for the account. not the email address, I can authenticate and send via sendgrid. |
Ok, this was indeed the issue in my case (I created some testing credentials with a password without special characters, so I thought this was the issue). Do you think we could make the error message that |
Yeah, that is a legitimate concern. I tried to reproduce your original error with the 'argument' error, but I could not, we should fix that too. |
I was able to reproduce this using a binary (default for Elixir) instead of a char list for |
@keichan34 looking at the current code I suspect your issue has been resolved. @stevedomin Is this still a problem? |
In general: we could add a flag to enable the logging of all client/server communication for a specific request. |
While attempting to send through my Sendgrid account I got stuck on this error for ages. Basically my password had some special characters and I guess I needed to do some escaping, unfortunately the error reported wasn't helpful at all.
I'm wondering if these anything we can do to show a more meaningful error to the user. I'm more than happy to contribute, but I'll need some guidance.
I had to uncomment some logging to figure out the issue (see logs below).
(This is elixir, not erlang, sorry about that)
The text was updated successfully, but these errors were encountered: