Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def add_email_sender(request):
username = request.session.get('user', '')
emails = Email.objects.all()
if request.method == "POST":
sender_site = request.POST.get("sender_site")
sender_email_password = request.POST.get("sender_email_password")
smtpserver = request.POST.get("smtpserver")
Email.objects.create(username=sender_site,passwd=sender_email_password,email_server=smtpserver)
return render(request,"email_add_page.html",{"user": username,"emails": emails})