Wulf's Webden

The Webden on WordPress

mailto:

| 0 comments

Approaching the end of the afternoon at work earlier this week I was reviewing my collection of pending tasks, looking for something relatively minor but hopefully straightforward. We have a departmental directory with people, photos and contact details and the request that I should add a button to let others alert me if they spotted erroneous information seemed to fit the bill.

My first instinct was to build a form to generate an email, but that requires that the host server has a working mailing function (true in this case but an extra bit of configuration if moving it to a new home) and also how would I know who was sending the message, since the directory doesn’t presently require a login to view on the local area network? I then thought of adding a table to the backend database to capture requests. I could build alerts from that into the dashboard I’ve built to keep a daily check on server health but it still had the identification problem and would have required a fair amount of behind the scenes wiring.

That is when a more pragmatic solution came to mind, using a simple mailto URI to assist users to send me a message. Given the local scope of the project, I know those using it will have a suitable mail client installed to respond to the request and, if they do hit problems, there are other ways to contact me. A little bit of research to brush up on the syntax and I was able to create a link that not only generates an email to be sent to me but also provides a template telling me exactly which record they are writing about; by coming via the email system, it also tells me for free who is making the request (so I can ensure that changes originate from a suitable source rather than someone playing a prank).

Sweet!

Leave a Reply

Required fields are marked *.


This site uses Akismet to reduce spam. Learn how your comment data is processed.