0
Is there a simple tool that just dumps the content of a mailto link to console?
$ decode_mailto 'mailto:a@b.c?subject=qqq&body=www%20eee&'
To: a@b.c
Subject: qqq
www eee
0
Is there a simple tool that just dumps the content of a mailto link to console?
$ decode_mailto 'mailto:a@b.c?subject=qqq&body=www%20eee&'
To: a@b.c
Subject: qqq
www eee
3
$ cat decode_mailto #!/bin/bash perl -lpe 's/%([0-9a-fA-F]{2})/chr(hex($1))/eg;s/mailto:/To: /g;s/subject=/Subject: /g;s/body=/\n/g;s/[&?]/\n/g' $ chmod 755 decode_mailto $ echo 'mailto:a@b.c?subject=qqq&body=www%20eee&' | ./decode_mailto To: a@b.c Subject: qqq www eee $
Update for actual HEX-code, not just bare DEC-numbers (mindlapse). – Hannu – 2014-12-15T16:46:22.307
Why not just click on it, and it will appear in your e-mail client, correctly formatted? You don't have to send it. – AFH – 2014-12-12T16:18:45.640
The
mailto:
link may be generated outside normal desktop environment where e-mail client may work. – Vi. – 2014-12-12T16:20:56.227