I am trying to send an email from an app, however in my settings it asks to put the EMAIL_HOST_PASSWORD and although it worked, how can you protect it from being viewed it GitHub or when it's deployed?
settings.py:
EMAIL_HOST='smtp.gmail.com'
EMAIL_HOST_USER='lala@gmail.com'
EMAIL_HOST_PASSWORD=''
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
Views.py:
def contact(request):
if request.method=='POST':
message=request.POST['message']
send_mail('Contact Form',
message,
settings.EMAIL_HOST_USER,
['lala@gmail.com'],
fail_silently=False)
return render(request, 'first_app/contact.html')