[pmwiki-users] Question about mailto links with extras

Ben Pitzer bpitzer at gmail.com
Mon Dec 13 12:03:59 CST 2010


Actually, it looks like I have my solution.  Instead of...

[[mailto:user at domain.com?subject=Handover Template&body=Line1: %0ALine2:
%0ALine3 [some text]: %0A | Handover Template]]

...I tried the following, which is working as I would want it to at this
time:

[[ Handover Template -> mailto:user at domain.com?subject=Handover
Template&body=Line1: %0ALine2: %0ALine3 [some text]: %0A ]]

This allows me to see the link text 'Handover Template', and clicking on it
opens the email with the formatting which Petko helped me figure out.  While
Petko's suggestion for the custom markup would no doubt as well, I want to
thank list user Amos Satterlee for giving me the answer above.  I'll keep
Petko's suggestion in mind, as I may need to do some other things in future
which would make this necessary.  Thanks to all!

Regards,
Ben Pitzer

On Mon, Dec 13, 2010 at 12:44 PM, Petko Yotov <5ko at 5ko.fr> wrote:

> On Monday 13 December 2010 13:08:33 Ben Pitzer wrote:
> > to be ignoring the pipe before the link text, and treating that as part
> of
> > the email body, while showing the link on the page as the entire contents
> > of the mailto link, instead of just the desired link text.
>
> > [[mailto:user at domain.com?subject=Handover Template&body=Line1: %0ALine2:
> > %0ALine3 [some text]: %0A | Handover Template]]
>
> Hello. There is a conflict with the link brackets, parentheses and possibly
> other characters that need to be encoded to appear in links. If you can't
> change these characters, I could only suggest to use a custom markup to
> url-
> encode the full body content - you'll need a wiki admin to enable it, but
> it
> will make your life much easier.
>
> If you add to config.php the following line :
>
>  Markup('{{{}}}', '>{$var}', '/\\{\\{\\{(.*?)\\}\\}\\}/es',
>    'rawurlencode(PSS("$1"))');
>
> then, in your wiki page, you can add {{{any text between tripple braces}}}
> even newlines instead of %0A:
>
>  [[mailto:user at domain.com?subject={{{Handover Template}}}&body={{{
> Line1 :
> Line2 :
> Line3 (some text) :
> Line4 [test] :
> }}} | Handover Template]]
>
> The text between the tripple braces will be correctly encoded. Again, there
> is
> no garantee that the link will work in all browsers and in all e-mail
> clients.
>
> (There is a MarkupExprPlus 'urlencode' recipe in the Cookbook, but it
> cannot
> handle multiple lines.)
>
> Petko
>
> > > Hello. The link should really be on one line. If you want to insert
> > > newline
> > > characters in the future e-mail, use the combination "%0A", like this:
> > >  [[ mailto:test at example.net?body=Line1:%0ALine2:%0ALine3: | e-mail me
> ]]
> > >
> > > This way of defining a message body is probably not supported by all
> > > browsers
> > > and e-mail clients. It may be more convenient to use a Form-to-mail
> > > function:
> > > you create a form in your wiki website, visitors fill it and you
> receive
> > > the
> > > results in your e-mail. There is a PmForm module which is able to do
> > > this, see
> > >
> > >  http://www.pmwiki.org/wiki/Cookbook/PmForm     and
> > >  http://www.pmwiki.org/pmform/PmForm/MailForm   for the form-to-mail
> > >
> > > function
> > >
> > > PmForm works well, but you need an administrator to install it.
> > >
> > > Petko
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20101213/f700ae1a/attachment.html>


More information about the pmwiki-users mailing list