def send_mail(): # Change the stored email address to whatever the user put in the form. emailAddress = request.args.get('emailAddress') response = call_sendMail_endpoint(session['access_token'], session['alias'], emailAddress) # The success code for /me/sendMail is 202. Check to make sure # that the operation completed successfully. if response == 202: showSuccess = 'true' showError = 'false' else: print(response) showSuccess = 'false' showError = 'true' session['pageRefresh'] = 'false' return render_template('main.html', alias=session['alias'], emailAddress=emailAddress, showSuccess=showSuccess, showError=showError)
def send_mail(): # Change the stored email address to whatever the user put in the form. emailAddress = request.args.get('emailAddress') response = call_sendMail_endpoint(session['access_token'], session['alias'], emailAddress) # The success code for /me/sendMail is 202. Check to make sure # that the operation completed successfully. if response == 202: showSuccess = 'true' showError = 'false' else: print(response) showSuccess = 'false' showError = 'true' session['pageRefresh'] = 'false' return render_template('main.html', alias=session['alias'], emailAddress=emailAddress, showSuccess=showSuccess, showError=showError)
def send_mail(request): # Change the stored email address to whatever the user put in the form. request.session['emailAddress'] = request.GET.get('emailAddress') response = call_sendMail_endpoint(request.session['access_token'], request.session['alias'], request.session['emailAddress']) # The success code for /me/sendMail is 202. Check to make sure # that the operation completed successfully. if response == 202: request.session['showSuccess'] = 'true' request.session['showError'] = 'false' else: print(response) request.session['showSuccess'] = 'false' request.session['showError'] = 'true' request.session['pageRefresh'] = 'false' return HttpResponseRedirect(reverse('connect:main'))
def send_mail(request): # Change the stored email address to whatever the user put in the form. request.session['emailAddress'] = request.GET.get('emailAddress') response = call_sendMail_endpoint(request.session['access_token'], request.session['alias'], request.session['emailAddress']) # The success code for /me/sendMail is 202. Check to make sure # that the operation completed successfully. if response == 202: request.session['showSuccess'] = 'true' request.session['showError'] = 'false' else: print(response) request.session['showSuccess'] = 'false' request.session['showError'] = 'true' request.session['pageRefresh'] = 'false' return HttpResponseRedirect(reverse('connect:main'))