Comparing 2 forms not linked to send email

Comparing 2 forms not linked to send email

Hi,

I want to compare 2 forms not linked, but with identical customer email fields.

Form 1 : CustomerForm
Form 1 fields : CustEmail, PartnerEmail, Reminder (yes-no)

Form 2 : CalendarForm
Form 2 fields : CustEmail, DeliveryDate, DeliveryLocation

The aim is to send a reminder email to the PartnerEmail if there is a delivery today.

I tried the following:

DeliveryList = CalendarForm [DeliveryDate == Zoho.currentdate];
ReminderList = CustomerForm [Reminder == "true"];
for each  record in DeliveryList
{
    if(ReminderList.contains(CustEmail)
    {
        sendmail
        [
            from :Admin
            to :PartnerEmail
            subject :"Delivery today"
            message :"You have a delivery today at" + DeliveryLocation
        ]
    }
}

It does not work ! Help !

Sylvain