Skip to Content.
Sympa Menu

en - RE: [sympa-users] URL unsubscribe in footer

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "address@concealed" <address@concealed>, "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] URL unsubscribe in footer
  • Date: Wed, 21 May 2014 22:05:18 +0000

> However sympa keeps adding the URL as an attachment and does not
> include it in the message when the message is send. Every subscription is
> 'only html' or 'mail'. The merge footer is enabled and we customized the
> footer according to the above url.
>
> footer_type = add a new MIME part
> merge_feature = on

As David mentioned, when using type 'add' you will get a separate MIME part
. You need to use 'append' to append to the message.

However, the problem with this is that, if your message is already in MIME
format -- such as HTML messages with text alternates -- you can't append.
Even if you can, appending to an HTML message can be problematic and result
in nothing happening, such as if the message has a close HTML tag.

There is a way around it, but it is a bit messy. You can append a
MIME-multipart with an inline disposition ('what?', I hear you say...)

In your list definition, instead of using the file 'message.footer', use
'message.footer.mime' which indicates that it already contains the necessary
MIME parts.

This file should contain something like this (without the 'cut here' lines):

----------cut here-------------------
Content-Type: multipart/alternative; boundary="_x_1234567890"
Content-Disposition: inline

This is an alternative MIME format

--_x_1234567890
Content-Type: text/plain;
Content-Disposition: inline

To unsubscribe from this list, visit: [% wwsympa_url %]/auto_signoff/[%
listname %]/[% user.escaped_email %]

--_x_1234567890
Content-Type: text/html;
Content-Disposition: inline

<HTML>
<HR />
<B><A href="[% wwsympa_url %]/auto_signoff/[% listname %]/[%
user.escaped_email %]">Click here to unsubscribe</A></B>
<HR />
</HTML>

--_x_1234567890--

-------------------cut here--------------------------

Then, set your list to a footer type of 'mime'. The whole MIME section, as
multipart-alternative inline will be appended. This should result in the
correct footer part being appended at display time.

Of course, this does depend on the mail reader correctly handling MIME
multipart alternative, and inline content disposition. Most recent mail
readers do this correctly; if they do not, you'll see the footer as a
separate attachment as you do now.

I've tested this on our system, and it works...

Steve

Steve Shipway
address@concealed


Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page