[Gambas-user] Smtp property Alternative - How to use?

Benoît Minisini gambas at ...1...
Mon Apr 29 16:25:16 CEST 2013


Le 18/04/2013 15:17, Willy Raets a écrit :
> Does someone know how to use SmtpClient.Alternative
>
> Documentation says:
> --------------
> PROPERTY Alternative AS Boolean
>
> Returns or sets if mail attachments are actually different alternatives
> of the same data. For example, a mail encoded in HTML, in UTF-8, or only
> in ASCII.
>
> By default, this property is FALSE. You must define it before using the
> Add method.
> --------------
>
> I have an attachment in plain text with tabs used.
> If Windows mail clients receive the attachment the tabs are not shown as
> should be (data is placed much further apart in Windows where the tabs
> are). I suppose this has to do with the original attachment using UTF-8
> and Windows clients using ASCII.
>
> Could Alternative be the solution I am looking for?
> If so, I don't understand how to implement this.
> How do I define this. An example would help
>

I see no relation between encoding problems (Window nightmare) and the 
Alternative flag.

And Alternative is just a flag. It tells the mail client that all 
attachments are actually the same data in different formats. Then the 
mail client decides what it does with that.

To use, set the property to TRUE just before filling the mail with text 
or attachments with the Add() method.

Regards,

-- 
Benoît Minisini




More information about the User mailing list