librelist archives

« back to archive

[mailcore2] textBody encoding

[mailcore2] textBody encoding

From:
Francesco Tartaggia
Date:
2013-11-11 @ 20:13
Hello everybody,

I need to generate a RFC822 email message with an empty text body and an
attached file. The problem is that, as far as I can see from the mailcore2
source code, the textBody part is always declared with charset UTF-8.

Is there a way to force mailcore to declare a different charset for the
text body part?

Thank you in advance,
francesco tartaggia

Re: [mailcore] [mailcore2] textBody encoding

From:
Hoa V. Dinh
Date:
2013-11-11 @ 23:51
Do you really need to use a different charset, especially if you're going 
to have an empty text body?

-- 
Hoa V. Dinh


On Monday, November 11, 2013 at 12:13 PM, Francesco Tartaggia wrote:

> Hello everybody,
> 
> I need to generate a RFC822 email message with an empty text body and an
attached file. The problem is that, as far as I can see from the mailcore2
source code, the textBody part is always declared with charset UTF-8. 
> 
> Is there a way to force mailcore to declare a different charset for the 
text body part?
> 
> Thank you in advance,
> francesco tartaggia
> 
> 
> 

Re: [mailcore] [mailcore2] textBody encoding

From:
Francesco Tartaggia
Date:
2013-11-12 @ 08:59
I know it sounds absurd, but the recipient's mail server is Ms Exchange
Server and the recipient is a software service. From what I see, with
textBody encoding "us-ascii" all is fine, but when encoding is "utf-8"
Exchange delivers to the recipient an invalid attachment (maybe it is
sending some winmail.dat attachment and the recipient automatic service get
confused by it).

As a workaround I'm manipulating the NSData of the generated message, but I
would like to know if there is a better way to accomplish what I need.

Thanks again,
francesco tartaggia


On Tue, Nov 12, 2013 at 12:51 AM, Hoa V. Dinh <dinh.viet.hoa@gmail.com>wrote:

>  Do you really need to use a different charset, especially if you're going
> to have an empty text body?
>
> --
> Hoa V. Dinh
>
> On Monday, November 11, 2013 at 12:13 PM, Francesco Tartaggia wrote:
>
> Hello everybody,
>
> I need to generate a RFC822 email message with an empty text body and an
> attached file. The problem is that, as far as I can see from the mailcore2
> source code, the textBody part is always declared with charset UTF-8.
>
> Is there a way to force mailcore to declare a different charset for the
> text body part?
>
> Thank you in advance,
> francesco tartaggia
>
>
>

Re: [mailcore] [mailcore2] textBody encoding

From:
Francesco Tartaggia
Date:
2013-11-13 @ 16:02
I just saw that textBody encoding is not always the same even if the text
message is indeed the same (an empty string). Encoding seems to be a
function of the [encoding of the] name of the attached file. Is that
possible?

Thanks,
francesco tartaggia

Re: [mailcore] [mailcore2] textBody encoding

From:
Hoa V. Dinh
Date:
2013-11-13 @ 22:54
Could you show examples? 

-- 
Hoa V. Dinh


On Wednesday, November 13, 2013 at 8:02 AM, Francesco Tartaggia wrote:

> I just saw that textBody encoding is not always the same even if the 
text message is indeed the same (an empty string). Encoding seems to be a 
function of the [encoding of the] name of the attached file. Is that 
possible?
> 
> Thanks,
> francesco tartaggia
> 

Re: [mailcore] [mailcore2] textBody encoding

From:
Francesco Tartaggia
Date:
2013-11-14 @ 09:02
Sorry, my mistake: it's Exchange that modifies text body part encoding if
the attached file name contains non-ascii characters.


On Wed, Nov 13, 2013 at 11:54 PM, Hoa V. Dinh <dinh.viet.hoa@gmail.com>wrote:

>  Could you show examples?
>
> --
> Hoa V. Dinh
>
> On Wednesday, November 13, 2013 at 8:02 AM, Francesco Tartaggia wrote:
>
> I just saw that textBody encoding is not always the same even if the text
> message is indeed the same (an empty string). Encoding seems to be a
> function of the [encoding of the] name of the attached file. Is that
> possible?
>
> Thanks,
> francesco tartaggia
>
>
>