You have to do:
def send_mail(form):
The form will be passed as an argument to send_mail (same as if you use a
lambda). Note, you don't have to name the argument 'form' -- call it
whatever you want.
Anthony
On Thursday, October 13, 2011 9:32:35 AM UTC-4, Web2Py Freak wrote:
>
> thnx its working now but i want to ask you somthing , how can i do
> it in a function :
>
> def send_mail():
> mail.send('[email protected]','Contact Us form by : '
> +form.vars.your_email,'<html><h4>Full Name :'+form.vars.your_name+'</
> h4><h4> Email :'+form.vars.your_email+'</h4></br><p><h3>Comment
> is :</
> h3>'+ form.vars.comment+'</p></br><p> Band is:'+form.vars.your_band
> +'</
> p></html>')
>
> return None
>
>
> but when i do it like this the function dose not understand what is
> 'form'