If you need to send email when the form submits,
try in your controller where the action is routed
ie form action="/xxx"
#get the values and perform actions from post
mail_obj.send() or use send_mail() function
You'll find a similar examples in this post: How to send an email after login?
and in this: How to send an email via python with the new API ?
Yes Sama it is possible. See the python code
sender = 'username'
receivers = 'destinations'
message = """hai """
smtpObj = smtplib.SMTP(host='smtp.gmail.com', port=587)
smtpObj.sendmail(sender, receivers, message
print "Successfully sent email
All the best !
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/7/16, 3:16 AM|
|Seen: 128 times|
|Last updated: 11/11/16, 5:36 AM|