I did try  it without the quotes & it still gave me an error!

On Sunday, February 23, 2020 at 2:59:04 PM UTC+2, Scott Hunter wrote:
>
> Did you try removing the quotes around the address?
>
> - Scott
>
>
>
> On Saturday, February 22, 2020 at 4:56:04 PM UTC-5, mostwanted wrote:
>>
>> 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/f4b484cf-3e8c-4714-b8d7-a54a2038a714%40googlegroups.com.

Reply via email to