NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on March 19, 2008, 09:34:15 PM
-
I want to add 2 HTML buttons to an email to accept or decline an event
Are there any examples in Nettalk on how to intercept this request and process the event?
Cheers,
Kevin
-
Of course adding the button in an email is not a problem, right? So what I would do is generate the email's HTML to call the procedure with a parameter. Maybe something like:
button URL to accept invitation: http://www.yoursite.com/Invite?accept=1
button URL to reject invitation: http://www.yoursite.com/Invite?accept=0
Then in your procedure, do something like:
CASE SUB(p_web.wholeurl,1,8)
OF 'accept = 1'
... do the accept stuff...
OF 'accept = 0
... do the reject stuff...
END !Case
-
Hi Kevin,
Mike is right. All you're gonna do is generate a small <form> in your Emails HTM section. The "action" for the form will be a URL of your site. Getting the URL right is important, so something like;
http://www.yoursite.com/response?accept=yes&user=lkhjfgsld8945
Obviously each email you send out has a unique "user" field whatever that is. Typically it's the unique id of the record in the database.
In your procedure, called Response, you can use p_web.GetValue('accept') and so on.
But wait, there's more.
Many email clients no longer allow a Button in an Html email. In other words this approach no longer works. You are allowed a link though, so instead of a <form> with buttons, you use a link.
Cheers
Bruce