testsmtp.prg - Can't get it working.

Post Reply
Dan Landon
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am

testsmtp.prg - Can't get it working.

Post by Dan Landon »

I'm trying to include the SendMail() routine in the testsmtp.prg test program in my application to send an email. I've changed it to my SMTP server and my email. All I get from the GetHostByName() call is an IP address of 0.0.0.0. It also seems to return very quickly which looks like it is not doing the lookup.

I am using Xbase++ version 1.82 and FW++ 2.6.

Anyone have any ideas? I suspect that this doesn't work in Xbase++.

Dan
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Dan,

We are reviewing it. We will answer you asap.
regards, saludos

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

Post by Antonio Linares »

Dan,

Ok, its working. There are some little changes to implement:

In samples\TestSmtp.prg, change:

oOutMail = TSmtp():New( cIP := GetHostByName( "smtp.fivetechsoft.com" ) )

into:

WSAStartup()
oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.fivetechsoft.com" ) ) // Notice the use of ":=" at the beginning

That will provide you a valid cIP.

Also there is a change needed at Class TSmtp. We may tell you the change, or we may send you a fixed Five32rt.dll. Please let us know.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Dan Landon
Posts: 28
Joined: Wed Nov 09, 2005 11:46 am

Post by Dan Landon »

I'd prefer the revised fivert32rt.dll.

Thanks
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Dan,

Please send us an email requiring it (Five32rt.dll). Thanks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
angelo.c
Posts: 36
Joined: Thu Mar 30, 2006 11:19 am

TSMTP Source Code Correction

Post by angelo.c »

Can you post the change to the source code for the TSMTP class. I need to fix it in my program.

Thankyou :D
Angelo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
angelo.c
Posts: 36
Joined: Thu Mar 30, 2006 11:19 am

Post by angelo.c »

Hi Antonio,

Thankyou for the source for the updated Tsmtp class.

I have compiled it in my program and I get the following two (2) function references which can not be resolved:
cFileNoPath(...) ---I assume it has something to do with getting file paths
FMimeEnc(...) ---I assume file MIME Encoding is done here

I have the following version:
#define FWVERSION "FiveWin++ 1.82 - February 2004"
#define FWDESCRIPTION "FiveWin++ for Xbase++"
and use Alaska XBase++ 1.82 International.

I have put in dummy functions for the two above and the sending of Email text works fine.

Is it possible to get the source for the two functions and put them in as Static functions into my source.


Thankyou and Best regards,
Angelo
:lol:
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Angelo,

cFileNoPath() source code is located at source\function\filename.prg

FMimeEnc() source code is located at source\function\mimeclip.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
angelo.c
Posts: 36
Joined: Thu Mar 30, 2006 11:19 am

Post by angelo.c »

Hi Antonio

Thanks. That was easy. I should have looked in there before I asked the question. So much for working late and being so tired you don't think straight.

My program compiles and links OK now.

Thanks again,
Angelo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Fine :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply