Reputation: 23
I have a html form asking for album selection from a menu and client's email address from an input.
<form>
<h3>Please select an album:</h3>
<select>
<option>2016_May_Birthday_Party</option>
<option>2016_April_Birthday_Party</option>
<option>test_3</option>
</select>
<p></p>
<h3>Please enter your email: <input type="text" name="emailadd"></h3>
<input type="submit" value="Submit">
</form>
I would like to take the user's selection and email address as argument to run SendMail(recipient, album)
function in sendmail.py
on the server to send an email to the client. New to web programming, thanks for help!
Upvotes: 2
Views: 900
Reputation: 426
There is no easy and short answer to this question.
You need some simple server running to grab data that you want to send through email and then run sending mail part.
If you are capable of learning from Python documentation, this is one of many frameworks that can be used to achieve that.
Else you might consider checking this awesome Python web development tutorial which will help you understand how to create web applications using this great language which is Python!
Upvotes: 2
Reputation: 1084
You need to specify action in form tag and create a view on the specified action's url where you can call that function. To create view you need to use anyone of the frameworks like flask, bottle, django etc.
Upvotes: 0