HowTo: Configure Gmail as Kegbot E-Mail Provider

If you would like to use a Gmail account to send E-mail on behalf of Kegbot Server, please refer to these instructions to configure local_settings.py, and use the following configuration settings - specific to Gmail.

  • EMAIL_HOST = ‘smtp.gmail.com
  • EMAIL_PORT = 587
  • EMAIL_USE_SSL = False
  • EMAIL_USE_TLS = True

Fair warning: GMail is not designed for bulk/automated notifications, and your account could be limited by Google in unexpected ways.

2 Likes

sorry to revive an old thread but every time I add the line to local_settings.py in:

/home/kegbot/.kegbot/local_settings.py
I get the 502 error. MY local_settings.py looks like:

# Kegbot local settings.
# Auto-generated by /home/kegbot/kegbot-server.venv/bin/setup-kegbot.py version 1.1.0.
# Safe to edit by hand. See http://kegbot.org/docs/server/ for more info.

# NEVER set DEBUG to `True` in production.
DEBUG = False
TEMPLATE_DEBUG = DEBUG

DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'kegbot', 'HOST': '', 'USER': 'root', 'PASSWORD': '', 'OPTIONS': {'init_command': 'SET storage_engine=INNODB'}}}

KEGBOT_ROOT = '/home/kegbot/kegbot-data'

MEDIA_ROOT = '/home/kegbot/kegbot-data/media'

STATIC_ROOT = '/home/kegbot/kegbot-data/static'

SECRET_KEY = 'j90izjuy#o2dny0q9vr1q)0@5n951-18pvbk)i=-fepm(*b6up'

# Tell Kegbot use the SMTP e-mail backend.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

# SMTP server hostname (default: 'localhost') and port (default: 25).
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587

# Credentials for SMTP server.
EMAIL_HOST_USER = 'brewpalacekegbot'
EMAIL_HOST_PASSWORD = '************'
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True

# "From" address for e-mails.
EMAIL_FROM_ADDRESS = '[email protected]

(please surround pasted code with triple-backticks – i edited your post)

Is EMAIL_FROM_ADDRESS missing the closing quote?

thanks mikey it was the closing quote, I’m always missing some mundane detail

now the next issue, went I try to send a test email I dont recieve anything, however gmail noticed and blocked an attempt to sign into my account. I approved less secure apps to use the account. However now i see nothing in the sent box or the inbox of the admin account. Is there something else i need to set in gmail?and i double checked user and password are correct.

issue fixed. and if enyone else has the same trouble as I…

EMAIL_HOST_USER = ‘username’

username includes @gmail.com

1 Like