2

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!

Mohammad
21.5k16 gold badges58 silver badges86 bronze badges
asked Jun 23, 2016 at 9:33

2 Answers 2

2

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!

answered Jun 23, 2016 at 9:41
Sign up to request clarification or add additional context in comments.

2 Comments

Would it be easier to translate my sendmail python script into a js one to get rid of installing frameworks?
You cannot send emails by JavaScript, because JavaScript is running user side. The only way is to host web application that will send emails.
0

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.

answered Jun 23, 2016 at 9:40

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.