Hi There,
Using the "TestEmailsendControl template"
Im wanting to send bulk emails.
The problem is that the looping of the code seems to overwrite the lsendto variable so that all the emails go to one email address.
The email address changes with the messages.as expected.
Is there a work around, or a different template perhaps?
Thanks
Richard
This is the code im using to call the template and process....
lCount = 0
Display()
SET(Dinner)
LOOP until access:Dinner.Next()
IF Din:EmailConfirmation = 1 THEN CYCLE END
IF Din:RequestDate < lstartdate THEN CYCLE END
IF Din:RequestDate > lenddate THEN CYCLE END
lsendto = Din:Email
MESSAGE('Din:Email = '& Din:Email)
POST(EVENT:Accepted,?BUTTONSendEmail)
MESSAGE('Din:Email = '& Din:Email)
lCount += 1
Display()
Din:EmailConfirmation = 1
access:Dinner.Update()
END