Link the email field from another database

Link the email field from another database


Hello,

I do not know how to do this. I have created two forms, one with contact information like:

Centre: XXXX
Email: xxxx@yyyy.com
Etc.



And another one with a list of companies, like:

Company Name: ZZZZZ
Centre: XXXX                            (This one is a "Look-up" field linked with the previous form)
Send Email?    [ ]                      (This is a decision box)




The idea is to send an email to the centre of the company if the "Send email?" checkbox is selected. My try:
if(input.Send_Email == true)
{
sendmail
[
from:zoho.adminuserid
to: [What should I write here?]
subject:"Confirmation email for" + Company_Name
 message:"Content"
content type:HTML
]
}









Thanks in advance!


Carlos.