FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Fivewin and smtp
Posts: 22
Joined: Fri Nov 04, 2005 09:05 PM
Fivewin and smtp
Posted: Thu Dec 15, 2005 08:25 AM

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 .

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Fivewin and smtp
Posted: Thu Dec 15, 2005 09:25 AM
Philippe,

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

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


and worked fine.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 22
Joined: Fri Nov 04, 2005 09:05 PM
fivewin and smtp
Posted: Thu Dec 15, 2005 09:59 AM

Antonio,
does it mean that it is not possible to attach a file ?

Thanks

Philippe Jacquet

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Fivewin and smtp
Posted: Thu Dec 15, 2005 02:32 PM

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 ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Fivewin and smtp
Posted: Thu Dec 15, 2005 05:30 PM

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.

Saludos

R.F.

Continue the discussion