hi
i have one contact page where i have
db.define_table('message',
SQLField('your_name',requires=IS_NOT_EMPTY()),
SQLField('your_email',requires=IS_EMAIL()),
SQLField('your_message','text',default=VALUE),
SQLField('timestamp',default=str(datetime.datetime.now())))
def tlscontact():
form=SQLFORM(db.message,fields=['your_name','your_email','your_message'])
if form.accepts(request.vars,session):
subject='cfgroup message from '+form.vars.your_name
email_user(sender=form.vars.your_email,\
message=form.vars.your_message,\
subject=subject)
response.flash='your message has been submitted'
elif form.errors:
response.flash='please check the form and try again'
return dict(top_message=TOP_MESSAGE,form=form)
}
now in db.py
mail.settings.server = 'gae'
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = '[email protected]' # your
email
mail.settings.login = '[email protected] :feedback@themis
' # your credentials or None
auth.settings.captcha = Recaptcha(request,
'6LdtW8gSAAAAAPVbyL_oWtc58IzNaVbPF_xnoDsJ',
'6LdtW8gSAAAAAJleuqP9B8mQZWrpHwHjXfJ19dnT')
auth.settings.hmac_key = 'sha512:bcf360b7-609c-4928-
ad65-9ea04b04b233' # before define_tables()
auth.define_tables() # creates all needed
tables
auth.settings.mailer = mail # for user email
verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.messages.verify_email = 'Click on the link
http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s
to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link
http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s
to reset your password'
in local host mail is working but when i host in server its not work
and secoundly i want to addcaptcha in tls contact page can you help me
plz i add {{#Recaptcha(..., use_ssl=True, error_message='invalid',
label='Verify:', options='theme:'white''))}} but its not working
--
Best regards,
Rohit Raj Sharma
Web Developer - IT
Themis Lexsol Private Limited
Office: +91 804 201 1689, 1690
Mobile: +91 9900221219