I have added a button in my email.
On click of the button the following formula runs:
@If(disablebutton="1";
@Return(@Prompt([Ok];"";"Thank you but you have already clicked once! :) "));
@Prompt([Ok];"";"Thank you for the click! :) "));
@MailSend( "[email protected]"; ""; "" ; "I will be present at the event!" ;
"" ; "" ; [PriorityNormal] );
FIELD disablebutton:="1";
Above formula basically does the following:
if(disableButton is 1){
Open prompt : you have already clicked and return without executing anything ahead
}else{
Open prompt : Thank you for the click!
}
send email to the specified email address with specified subject
set disableButton = 1
So when the email is opened by the receiver, above formula restricts receiver to click button just once and as a result only one mail gets sent out to specified email address.
However, the issue is, if the user closes the mail and opens again, the same formula runs from the beginning which effectively allows receiver to send the mail again.
So effectively he can send as many mails to the specified email address by closing and opening the mail and clicking the button afresh.
How to deal with this ? I want the value of disableButton to persist permanently so that the mail gets sent out only once.