Include button to perform custom function in sendmail

Include button to perform custom function in sendmail

Greetings

i have a sendmail function where i want to include a custom button in the html of the message, when that button is clicked i want to invoke deluge code to update a record in my app. how would that be possible? 

something similar to this is zoho meetings emails where i can click on the buttons in the email to accept/decline a meeting's invitation 

thanks