Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I put both Get and Post URL link in an email

Tags:

html

post

email

get

I am building a new web application, and the boss had expressed a preference to have an email sent when something changes, and he wants to be able to click on a link in the email to approve or deny the changes (singly or en masse).

My question: Is it possible to put a POST request in an email, and if so, how? We run exchange internally, and with some work the emails could stay entirely within that, but the normal course of events would send the emails into the wide blue yonder.

My bonus question, which follows logically from the first, is whether it is wise to do so? Should I just have a GET link to a page which allows him to approve or deny requests directly through the application, rather than try to put a POST request in an email?

like image 787
Jonathan Avatar asked Mar 24 '11 08:03

Jonathan


People also ask

How do you make a URL clickable in email?

Select the text or picture that you want to display as a hyperlink. Press Ctrl+K. You can also right-click the text or picture and click Link on the shortcut menu. In the Insert Hyperlink box, type or paste your link in the Address box.

Can a link make a post request?

You can't. A link is a GET, by definition.


2 Answers

First question

Never tried it out but, if you use html in your mails it might be possible to build a <form method="post" action="yoururl"> environment which will allow him to approve or deny a change. If you do not build a restful webpage you might use a get link which approves/denies a change, something like http://url/change/2323/approve=yes

bonus question If it is not possible for you to send the <form> in your email it is okay to provide a GET link. Depending on how many changes your boss has to accept/deny it might be also a good idea to provide him a list of changes he can deny/accept in the . Because I don't like to switch between email app and webbrowser.

like image 85
EhmKah a.k.a. Michael Krauße Avatar answered Sep 20 '22 18:09

EhmKah a.k.a. Michael Krauße


No, you cannot (in form of clickable link). The HTTP POST requests contains parameters in its body, not in the URL.

like image 42
Kojotak Avatar answered Sep 20 '22 18:09

Kojotak