I've created an emailing form in my application but have substituted where the email goes with a reference that contains the email, the problem is that now the email is not being sent unless i write a proper explicit email address. Whats the difference between writing an explicit email address & using a variable that supposedly contains the email? I have to use the referencing variable as I currently am because different registered users get to log in & send emails, its not just one user. How can I solve this problem???
*CODE* def contact_us(): details=db.hotel_profile(request.args(0, cast=int)) form = SQLFORM.factory( Field('name', requires=IS_NOT_EMPTY()), Field('cell_number', requires=IS_NOT_EMPTY()), Field('email', requires =[ IS_EMAIL(error_message='invalid email!'), IS_NOT_EMPTY() ]), Field('subject', requires=IS_NOT_EMPTY()), Field('message', requires=IS_NOT_EMPTY(), type='text') ) if form.process().accepted: * mail.send(to='details.email_address', * #subject='contact request from %(your_name)s %(email)s' % form.vars, subject=form.vars.subject, message = '%(message)s \nName: %(name)s \nEmail Address: %(email)s \nCell Number: %(cell_number)s' % form.vars) response.flash = T('Thank you, your form was submitted') #redirect(URL('index')) return dict(form=form) Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/572c29c6-a77e-41e5-b086-53c098928bbc%40googlegroups.com.