title: Formula for a button in lotus notes
body: <p>I have added a button in my email. </p>
  
  <p>On click of the button the following formula runs:</p>
  
  <pre><code>@If(disablebutton="1"; 
      @Return(@Prompt([Ok];"";"Thank you but you have already clicked once! :) "));
      @Prompt([Ok];"";"Thank you for the click! :) "));
  @MailSend( "abc@xyz.com"; ""; "" ; "I will be present at the event!" ; 
              "" ; "" ; [PriorityNormal] );
  FIELD disablebutton:="1";
  </code></pre>
  
  <p>Above formula basically does the following:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>So effectively he can send as many mails to the specified email address by closing and opening the mail and clicking the button afresh. </p>
  
  <p>How to deal with this ? I want the value of disableButton to persist permanently so that the mail gets sent out only once. </p>