Page 1 of 1

Fivewin and smtp

PostPosted: Thu Dec 15, 2005 8:25 am
by jacquet philippe
I try to send a mail with smtp and it works good only when a attach a file .
In place of receiving the file , the user receive this :

name="c:\dmedi\test.doc"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="TEST.DOC"

here is the code FW25 Clipper 5.3
* ===
procedure VAMAIL()
local oOutM,oOutMail, cIP ,leficj

oOutM := TSmtp():New( cIP := GetHostByName( "smtp.ulg.ac.be" ) )
sysrefresh()
oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.ulg.ac.be" ) )
MsgWait("Mailing ", cIP,1 )
oOutMail:bDone = { || MsgWait("Done","Mailing ",1 ) }

oOutMail:SendMail( "jacquet@tiscali.be",; // From
{ "jacquetlg@tiscali.be" },; // To
"Test mail " ,; // Msg Text
"Essai Mail depuis BMT " , ; // Subject
{"c:\dmedi\test.doc"} ) // attached files
sysrefresh()
RETURN

Thanks for any help .
Philippe Jacquet .

PostPosted: Thu Dec 15, 2005 9:25 am
by Antonio Linares
Philippe,

We have just tested samples\TestSmtp.prg modified like this:

Code: Select all  Expand view
oOutMail:SendMail( "alinares@fivetechsoft.com",;     // From
                 { "alinares@fivetechsoft.com" },; // To
                 "It is working!!!",;              // Msg Text
              "Testing FiveWin Class TSmtp enhancements" ) // Subject


and worked fine.

fivewin and smtp

PostPosted: Thu Dec 15, 2005 9:59 am
by jacquet philippe
Antonio,
does it mean that it is not possible to attach a file ?

Thanks

Philippe Jacquet

PostPosted: Thu Dec 15, 2005 2:32 pm
by Antonio Linares
Philippe,

Yes, you may attach a file. In fact samples\testsmtp.prg sends an attached file.

I may have missunderstood you, do you want to send an attached file ? If so, how big is the file ?

PostPosted: Thu Dec 15, 2005 5:30 pm
by R.F.
Phillipe:

Fivewins's TSMTP doesn't support different file formats for attached files, all of them are handled like text.

You will need Luis Krause's modified TSMTP class that you can download from:

www.fivewin.info.