-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Support] Sendgrid email API can't use admin login or email verification #826
Comments
Hi @Shotman , sorry for the late response, as far as SMTP settings for SendGrid:
If those changes/settings don't work let me know. |
I've tried changing the settings accordingly and still no thing on the admin login or email verification, I get a gateway timeout |
Sorry, I meant Somewhat perplexed on this one as using SendGrid through MailKit should be pretty straightforward, e.g. https://blog.reyno.co.uk/sending-email-in-asp-net-core-2-0-with-sendgrid/ Is the 504 Gateway Time-out response coming from SendGrid on connect, on auth or coming from the Bitwarden API itself? |
And, can you post your python test script (w/o credentials of course) so I can compare what you're testing with on that host vs. our MailKit mail delivery implementation? |
Here is what I have now in the override :
And here is my Python code : import sendgrid
import os
from sendgrid.helpers.mail import *
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
from_email = Email("test@example.com")
to_email = To("my@email.com")
subject = "Sending with SendGrid is Fun"
content = Content("text/plain", "and easy to do anywhere, even with Python")
mail = Mail(from_email, to_email, subject, content)
response = sg.client.mail.send.post(request_body=mail.get())
print(response.status_code)
print(response.body)
print(response.headers) And the 504 - Gateway Timeout apprears on the browser itself so my guess it's from the bitwarden api |
Hi Team, I have installed the self hosted setup and the email functionality is not working for me as well. |
Any update on this issue ? |
Not sure if this will help anybody but sendgrid is working perfectly for me using only the following:
|
I tried your configs and still the same for me with bitwarden 2.16.2 I get a 504 Gateway Timeout, do you have a paid Sendgrid account of a free one ? Cause it worked during the premium trial for me but I don't know if it's the free tier or bitwarden config that causes an issue |
@Shotman I'm using the free plan (100 emails/day) and confirmed it's still working. I don't recall any special config on sendgrid either, aside from setting up the apikey. Let me know if there is anything there I can look at for you. |
Finally, I made it work with smtp.gmail.com. Even this smtp was complaining that the "an unsecure app is trying to access the account". I had to manually allow this logging into the gmail account mentioned in the config. Hope this helps you.. Both email verification and the admin account are working fine now... |
These settings don't work either so I have no idea what is happening to my instance ... I even tried using my real google password and I have NO notification or anything telling me that an app is trying to login to my account EDIT : I've tried using a different email for the admin login, maybe it was conflicting with the user email. Same result 504 Bad Gateway but the strange thing is that if I use a random email like |
Maybe this error log could help troubleshoot the problem ? |
@Shotman, Google ( gmail account you use) is considering the bitwarden as a insecure app trying to access it and is blocking by default. Please check the account settings and allow low secure apps in the google account., this fixed my issue. |
@SreekanthThummala I used an app password because I have 2FA activated so it shouldn't cause any problem, and I don't want to lower my gmail account overall security by enabling low secure apps, and even if I wanted I tried to and this option isn't available to me because I have other security options that aren't compatible with it |
hey @Shotman,Thank you for getting in touch and bringing this to our attention! We'd like to assist you further. We ask that you please contact us using our contact page, here: https://bitwarden.com/contact. You can include a link to this issue in the message content. The issue here will be closed and moved over to our Help Desk. |
Hello,
I can't seem to manage to make sendgrid work with bitwarden, at some point I managed to make it work but I don't remember how, and since my API key changed because the trial for the premium version expired I had to recreate an API Key and since then it doesn't work anymore I end up with "504 Gateway Time-out" on either admin login or email verification for account.
Here is the config :
So since it worked at some point I know it's possible but I don't have any more ideas on what to do, knowing that I trid sendgrid python test script from the host server and it worked so my credentials arent wrong
Any Ideas ?
The text was updated successfully, but these errors were encountered: