How could I automatically send email when I submited a form.
You need to have a python code that will generate the mail and send. You can place the below code (and modify it to fit your needs) in the model for which you want to send email, and than call the method send_mail("name of the temlate") from the code that handles your form submission, or I prefer to have a workflow associated with the model and send mail from the actions in the workflow.
def send_mail(self, cr, uid, ids, context=None, template=""):
for object in self.browse(cr, uid, ids, context=context):
# Check if the parnter has "opt_out" for the mail
if (not object.partner_id.opt_out):
template_id = self.pool.get('email.template').search(cr, uid, [("name","=",template)])
mail_message = self.pool.get('email.template').send_mail(cr,uid,template_id,object.id)
you can sent the email automatically by using server actions.
You see the following link for using the automated email: