-
Notifications
You must be signed in to change notification settings - Fork 8
/
Read Me.rtf
178 lines (160 loc) · 11.2 KB
/
Read Me.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;\f2\fnil\fcharset0 Verdana;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue255;\red108\green5\blue211;}
\vieww15020\viewh13780\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\f0\b\fs30 \cf0 Webmailer 1.3\
\b0\fs22 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\fs24 \cf0 Ever click on a
\f1\fs20 mailto:
\f0\fs24 link, only to scream in frustration as Apple Mail opens yet again? The curse of the webmail user is that there is no way to get around this problem. That is, until now.\
\
Webmailer is an unoriginally named program (actually a preference pane) for Mac OS X that allows you to fix this problem. You can set it to open any URL or run any shell script, complete with the parameters lifted from the mailto link.\
\
\b Install
\b0 \
Simply double-click the Webmailer.prefPane icon to launch System Preferences and install Webmailer. You will also need to set Webmailer to be the default handler for mailto URLs; this can be done right from the Webmailer preferences pane.\
\
\b Usage
\b0 \
Webmailer comes with several preset configurations for popular webmail systems. If you're using one of those, select it and click "Choose". Alternately, double-click next to your row in the column that displays which configuration is active. The green indicator should move to the row you want. If you are using a webmail
\i program
\i0 (e.g. SquirrelMail as opposed to Yahoo! Mail), you will need to change anything in CAPITAL LETTERS to match your actual mail website. You can find out what it should be by logging in to your mail and examining the URL.\
\
If, on a certain occasion, you want to choose a
\i different
\i0 configuration from your default, just hold down the shift key when you click the mailto link. (If your browser takes a different action when the shift key is pressed, just click first and then hold the shift key, or try holding shift and option instead.)\
\
By default, Webmailer attempts to guess which browser to use to open your webmail program. If you want Webmailer to always use a specific browser, or to use your system default value, you can set this in the "Advanced" preferences.\
\
\b Custom Configurations
\b0 \
If none of the default configurations match your webmail, you can make a new one by clicking the Add button. Enter a name, then press Tab to edit the destination field. This should generally be a URL, likely directed at the Compose page on your webmail site. You can use the following placeholders anywhere in the URL string; they'll be replaced with the appropriate parameters from the mailto link. (Keep in mind that your webmail site may not support all of them).\
\
[to] -- The recipient (often between the
\f1\fs20 mailto:
\f0\fs24 and the
\f1\fs20 ?
\f0\fs24 if there is one)\
[cc] -- Carbon/courtesy copy\
[bcc] -- Blind carbon copy\
[subject] -- Message subject\
[body] -- Message body\
[?] -- Everything after the
\f1\fs20 ?
\f0\fs24 in a mailto link\
[anything] -- If the mailto link has the value
\f1\fs20 anything
\f0\fs24 set, this will copy its value. This can be used with any word.\
\
You can also use the following modifying forms. The word "to" here is merely an example; any parameter including ? will work.\
\
[%to] -- URL-escape the parameter\
[#to] -- Give the number of characters in the parameter (useful for PHP serialize).\
[#%to] -- Give the number of characters in the URL-escaped form of the parameter (less useful but there for completeness).\
\
URLs do have some reserved characters; if you want to put one of them in you should probably escape them using percent syntax. Note that this is only for characters in the literal URL; most of the time these don't matter for the parameters.\
\
(space) -- %20\
# -- %23 (not needed for [#parameter] syntax)\
$ -- %24\
% -- %25 (not needed for [%parameter] syntax)\
& -- %26 (only needed if it's an actual & within a value, not an argument separator).\
+ -- %2B\
, -- %2C\
/ -- %2F\
: -- %3A\
; -- %3B\
= -- %3D\
? -- %3F\
@ -- %40\
[ -- %5B (only needed because of Webmailer)\
] -- %5D (only needed because of Webmailer)\
\
Good luck!\
\
\b Shell Scripts
\b0 \
If you prefer, you can use a shell script instead of a URL -- for example, to log all URLs you click on. (Why you'd want to do this is another story, but there are command-line-based mail programs). Anything that doesn't create a valid URL will be interpreted as a shell script and run in the Terminal. All parameters are still supported, and URL encoding is unnecessary. However, any quotes in the URL are automatically URL-encoded, so that quotes in your shell script will work as expected. It is suggested that you use single quotes around any placeholders in your script.\
\
"But wait," you say, "I just wanted to log everything to a file. I didn't want to open the Terminal for
\i that
\i0 ." That's easy. Just add a # to the very beginning of the line. (This would be interpreted as "comment" in most shells, so it won't make any commands impossible to run). The resulting command, which might look something like this: "#echo [to] >> ~/mailto.txt", will run without the Terminal opening at all.\
\
If you just want to open a file or application (as if you had clicked on it in the Finder) you can either use a file URL:\
\
file:///Applications/Mail.app\
\
or a shell script:\
\
open /Applications/Mail.app\
\
But neither one will allow you to pass parameters to the program or file, so it's a lot less useful than it might seem. Instead, you can use an AppleScript to pass parameters to a given app:\
\
\pard\pardeftab720
\cf0 #osascript -e 'tell application "Mail"' -e 'GetURL "mailto:[to]?[?]"' -e 'activate' -e 'end tell'\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\cf0 \
But if you were actually going to use Mail, you wouldn't have downloaded Webmailer, right?\
\
\b AppleScript
\b0 \
\
Webmailer includes basic AppleScript support. Destinations can be accessed by name, and have an additional
\b URL
\b0 property. Currently you cannot add or delete destinations via AppleScript, but you can set the active destination as shown below:\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\tx7280\tx7840\tx8400\tx8960\tx9520\tx10080\tx10640\tx11200\tx11760\tx12320\tx12880\tx13440\tx14000\tx14560\tx15120\tx15680\tx16240\tx16800\tx17360\tx17920\tx18480\tx19040\tx19600\tx20160\tx20720\tx21280\tx21840\tx22400\tx22960\tx23520\tx24080\tx24640\tx25200\tx25760\tx26320\tx26880\tx27440\tx28000\tx28560\tx29120\tx29680\tx30240\tx30800\tx31360\tx31920\tx32480\tx33040\tx33600\tx34160\tx34720\tx35280\tx35840\tx36400\tx36960\tx37520\tx38080\tx38640\tx39200\tx39760\tx40320\tx40880\tx41440\tx42000\tx42560\tx43120\tx43680\tx44240\tx44800\tx45360\tx45920\tx46480\tx47040\tx47600\tx48160\tx48720\tx49280\tx49840\tx50400\tx50960\tx51520\tx52080\tx52640\tx53200\tx53760\tx54320\tx54880\tx55440\tx56000\li832\fi-833\pardirnatural
\f2\b\fs22 \cf0 \CocoaLigature0 tell
\b0
\i \cf2 application
\i0 \cf0 "Webmailer"\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\tx7280\tx7840\tx8400\tx8960\tx9520\tx10080\tx10640\tx11200\tx11760\tx12320\tx12880\tx13440\tx14000\tx14560\tx15120\tx15680\tx16240\tx16800\tx17360\tx17920\tx18480\tx19040\tx19600\tx20160\tx20720\tx21280\tx21840\tx22400\tx22960\tx23520\tx24080\tx24640\tx25200\tx25760\tx26320\tx26880\tx27440\tx28000\tx28560\tx29120\tx29680\tx30240\tx30800\tx31360\tx31920\tx32480\tx33040\tx33600\tx34160\tx34720\tx35280\tx35840\tx36400\tx36960\tx37520\tx38080\tx38640\tx39200\tx39760\tx40320\tx40880\tx41440\tx42000\tx42560\tx43120\tx43680\tx44240\tx44800\tx45360\tx45920\tx46480\tx47040\tx47600\tx48160\tx48720\tx49280\tx49840\tx50400\tx50960\tx51520\tx52080\tx52640\tx53200\tx53760\tx54320\tx54880\tx55440\tx56000\li1665\fi-1665\pardirnatural
\cf0
\b set
\b0 \cf3 active destination\cf0
\b to
\b0
\i \cf2 destination
\i0 \cf0 "Apple Mail"\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\tx7280\tx7840\tx8400\tx8960\tx9520\tx10080\tx10640\tx11200\tx11760\tx12320\tx12880\tx13440\tx14000\tx14560\tx15120\tx15680\tx16240\tx16800\tx17360\tx17920\tx18480\tx19040\tx19600\tx20160\tx20720\tx21280\tx21840\tx22400\tx22960\tx23520\tx24080\tx24640\tx25200\tx25760\tx26320\tx26880\tx27440\tx28000\tx28560\tx29120\tx29680\tx30240\tx30800\tx31360\tx31920\tx32480\tx33040\tx33600\tx34160\tx34720\tx35280\tx35840\tx36400\tx36960\tx37520\tx38080\tx38640\tx39200\tx39760\tx40320\tx40880\tx41440\tx42000\tx42560\tx43120\tx43680\tx44240\tx44800\tx45360\tx45920\tx46480\tx47040\tx47600\tx48160\tx48720\tx49280\tx49840\tx50400\tx50960\tx51520\tx52080\tx52640\tx53200\tx53760\tx54320\tx54880\tx55440\tx56000\li832\fi-833\pardirnatural
\b \cf0 end
\b0
\b tell
\f0\b0 \CocoaLigature1 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\fs24 \cf0 \
\
\b Uninstall
\b0 \
If you actually don't like Webmailer (for whatever reason), you can uninstall it by control-clicking on its icon in the "Show All" view of System preferences and choosing to remove it. The default mail handler should revert to Apple Mail; if it doesn't, try emptying the Trash (where the preference pane usually ends up).\
\
\b Notes
\b0 \
\i Why are there two SquirrelMail modes?\
\i0 Unfortunately, some SquirrelMail accounts don't seem to support mailto.php (the first mode). For these, you'll have to make do with SquirrelMail 2, which directly opens the composition page but doesn't have the sidebar.\
\
\i It's not working.
\i0 \
Well, that's not a great way to ask questions, but even so, the most likely problem is that you didn't enter the URL correctly. If it still doesn't work, you can try changing all of the [parameter]s to [%parameter]s. If it
\i still
\i0 doesn't work, you can always send your specific problem to Belkadan Software.\
\
If it's one of the default URLs that doesn't work, and you haven't modified it (beyond putting in your site's addres, if applicable), please notify me so that I can fix it quickly. Not having certain programs made it difficult to test some of these.\
\
\i Why didn't you include webmail client X?
\i0 \
Obviously the default list of webmail clients can't be infinite, and Webmailer includes some of the top choices for webmail programs. However, if you have a client you think should be on the default list that ships with Webmailer, please tell me. (It is also more helpful if
\i you
\i0 can figure out the destination URL, rather than making me do it).\
\
More destination URLs are compiled at {\field{\*\fldinst{HYPERLINK "http://belkadan.com/webmailer/destinations"}}{\fldrslt http://belkadan.com/webmailer/destinations}}.\
\
\b Contact
\b0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
{\field{\*\fldinst{HYPERLINK "mailto:[email protected]"}}{\fldrslt \cf0 [email protected]}}: Bugs, requests, questions, new destination URLs? E-mail me!\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
{\field{\*\fldinst{HYPERLINK "http://belkadan.com/"}}{\fldrslt \cf0 belkadan.com}}: Get more great programs from Belkadan Software!}