Comment 6 for bug 832659

Revision history for this message
Kitserve (ubuntu-kitserve) wrote :

Okay, it took months rather than weeks to get round to it, but I finally made the improvements to the contact form. Attached are an updated version of contactform.site.php and some modified language files.

Key changes from last version:
Language file contains %s placeholders in email subject string $lang['contactform']['email_title'].
Contact form code replaces %s placeholders with website name and sender name.
Contact form code also detects whether sender name or site title include non UTF-7 characters, and if so base64 encodes them.

N.B. if the sender name only contains UTF-7 characters, no encoding takes place, which avoids triggering FROM_EXCESS_BASE64 in SpamAssassin. Also N.B. that the encoding would be a bit neater if we used quoted-printable encoding, but this would require PHP function imap_8bit(), which requires the IMAP module. I wanted to avoid requiring any extra dependencies.

Unfortunately my knowledge of languages other than English is rather limited. I've attached modified language files for English, French, German, Italian and Spanish, but $lang['contactform']['email_title'] needs to be edited for the other languages to include the necessary %s placeholders.