Is there a way to force the encoding of emails to plain text.
Outlook is getting the mails as two attachments both ending in .dat.
The attachment looks like an encoded text.
Thanks.
/Steve
email - force to plain text ?
-
sonichouse
- Regular
- Posts: 196
- Joined: Sun May 11, 2008 2:53 am
- Contact:
email - force to plain text ?
Steve is occasionally blogging here
-
sonichouse
- Regular
- Posts: 196
- Joined: Sun May 11, 2008 2:53 am
- Contact:
OK, I butchered functions.inc.php to do
there must be a better way ?
Code: Select all
if (0 && LANG_CHARSET == 'UTF-8') {Steve is occasionally blogging here
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Which mails? s9y always sends text mails.
Check your local SMTP if it is messing with the files? When UTf-8 encoding is needed, s9y only issues the proper Transfer-Encoding headers. But that does NOT result in attachments! Have a look at the Content-Type, s9y always sends text/plain, and no multiparts.
Regards,
Garvin
Which mails? s9y always sends text mails.
Check your local SMTP if it is messing with the files? When UTf-8 encoding is needed, s9y only issues the proper Transfer-Encoding headers. But that does NOT result in attachments! Have a look at the Content-Type, s9y always sends text/plain, and no multiparts.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
sonichouse
- Regular
- Posts: 196
- Joined: Sun May 11, 2008 2:53 am
- Contact:
The mails where from the contact plugin.garvinhicking wrote:Hi!
Which mails? s9y always sends text mails.
Check your local SMTP if it is messing with the files? When UTf-8 encoding is needed, s9y only issues the proper Transfer-Encoding headers. But that does NOT result in attachments! Have a look at the Content-Type, s9y always sends text/plain, and no multiparts.
Regards,
Garvin
The SMTP is "nail" (pre-runner to mailx) and is running on my 32mb 266mhz NSLU2, so I am not surprised if it is the SMTP agent at fault.
Looks like nail is sending
The machine is not up to installing a full smtp like sendmail, so I might just have to live with it.User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
I will see what other options I have.
Thanks,
Steve
Steve is occasionally blogging here
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Yeah, this is the SMTP's issue then -- it changes the Content-Typ to an octet-stream, that's not what s9y instructs it to do.
So I'm afraid you'll need to use your patch (or see if you can configure nailx somehow) on your own...we cannot use it as a generic patch in s9y, because it would break more things than to repair with it -- all UTF-8 mails with special characters in it (umlauts etc.) would then not show up properly, if the base64-encoding were not provided.
Or you could even write your own plugin; s9y supports hooking in a plugin that does the mail delivery instead of using the internal routing system. You can use the "backend_sendmail" event for that, it gets the whole mail as an input array $eventData. The plugin then can do its delivery (with your custom modifications to the Headers) and simply switch $eventData['legacy'] to "false", so that the internal s9y routing is not executed.
HTH,
Garvin
Yeah, this is the SMTP's issue then -- it changes the Content-Typ to an octet-stream, that's not what s9y instructs it to do.
So I'm afraid you'll need to use your patch (or see if you can configure nailx somehow) on your own...we cannot use it as a generic patch in s9y, because it would break more things than to repair with it -- all UTF-8 mails with special characters in it (umlauts etc.) would then not show up properly, if the base64-encoding were not provided.
Or you could even write your own plugin; s9y supports hooking in a plugin that does the mail delivery instead of using the internal routing system. You can use the "backend_sendmail" event for that, it gets the whole mail as an input array $eventData. The plugin then can do its delivery (with your custom modifications to the Headers) and simply switch $eventData['legacy'] to "false", so that the internal s9y routing is not executed.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
sonichouse
- Regular
- Posts: 196
- Joined: Sun May 11, 2008 2:53 am
- Contact:
OK - resolved.
nail manual says
nail manual says
so I addedNail expects input text to be in Unix format, with lines separated by newline (^J, \n) characters only. Non-Unix text files that use carriage return (^M, \r) characters in addition will be treated as binary data; to send such files as text, strip these characters e. g. by
tr -d '\015' <input | nail . . .
or fix the tools that generate them.
Code: Select all
//SPF Hack for nail
$maildata['message']=str_replace("\r\n", "\n", $maildata['message']);Steve is occasionally blogging here