Fivewin and smtp

Fivewin and smtp

Postby jacquet philippe » Thu Dec 15, 2005 8: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 .
jacquet philippe
 
Posts: 22
Joined: Fri Nov 04, 2005 9:05 pm
Location: LIEGE Belgium

Postby Antonio Linares » Thu Dec 15, 2005 9:25 am

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

fivewin and smtp

Postby jacquet philippe » Thu Dec 15, 2005 9:59 am

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

Thanks

Philippe Jacquet
jacquet philippe
 
Posts: 22
Joined: Fri Nov 04, 2005 9:05 pm
Location: LIEGE Belgium

Postby Antonio Linares » Thu Dec 15, 2005 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby R.F. » Thu Dec 15, 2005 5: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.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 6 guests