[Gambas-user] smtp client

ron ronstk at ...239...
Tue Apr 24 17:37:55 CEST 2007


On Tuesday 24 April 2007 17:22, Steven Lobbezoo wrote:
> Of course you are right, 
> but how can I do otherwise.
> I cannot change the pdf, and the attachement has to be given as a string .

As far I understand the description in the help, the Data as String restriction
must have internal a workaround for it.

Else the help is not correct (as it now, strictly spoken) because the 
Data AS String does not match the internal behavior.

Should be Data As Variant and the 
Alternative=false for ASCII string (7bit)
Alternative=True for UTF-8 data (8bit)


> 
> Steven
> 

............


> > Declaration of tmp is String
> > You load a PDF file that is not pure a (ASCII) string.
> >
> > >From the help
> > > http://gambasdoc.org/help/comp/gb.net.smtp/smtpclient/alternative
> >
> > SmtpClient.Alternative (gb.net.smtp)
> >
> > 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.
> >
> > What happens if you try when this property is true?
> > pdf files are more like the UTF-8 (8bit) instead of ASCII (7bit)
> >
> > Ron
> >

did you try with the property Alternative ?

For the DIM you could use Variant or may be more accurate Object.
These type should be able to handle 'binairy' information.

Ron





More information about the User mailing list