Page 3 of 3

PostPosted: Tue Oct 07, 2008 8:52 pm
by Antonio Linares
Rick,

Please change bFailure this way:
Code: Select all  Expand view
oOutMail:bFailure := { | oSocket, nError, cReply | LogFile( "log.txt", { nError, "--", cReply, ProcName( 2 ) } ), oOutMail:nStatus := 7 }

Please change the 2 value in the ProcName() call so you get the proper method name, so we locate where Method Failure() has been called from, thanks

PostPosted: Tue Oct 07, 2008 9:16 pm
by Rick Lipkin
Antonio

Here are your results ..

Rick

Code: Select all  Expand view
10/07/2008 17:14:46: 0   --   550   TSMTP:ONREAD   
10/07/2008 17:14:56: 10048   --      TSMTP:ONCONNECT

PostPosted: Tue Oct 07, 2008 9:30 pm
by Antonio Linares
Rick,

It seems there is an error caused for a second try to connect to the same address:

http://support.ipswitch.com/kb/WSK-19980701-EM03.htm

PostPosted: Tue Oct 07, 2008 11:08 pm
by Rick Lipkin
Antonio

I have a instinctive feeling the port was not getting close on ( the first ) failure .. .. that is my guess ..

I am not a guru on the code .. is there a way you can look and see if the origional error actually closes the port ??

Thanks
Rick

PostPosted: Wed Oct 08, 2008 12:50 am
by James Bott
Rick,

Logfile() is a FW function and may also be called from TSocket which is called by TSMTP. It is called if oSocket:lDebug == .t. I don't know if it is set to .T. when it is being used by TSMTP.

Or, maybe you are using Logfile() somewhere else in your program?

For a quick test, you could try changing the filename passed to LogFile() to a different name other than "logfile.txt" and see if you still get the same two errors logged.

James

PostPosted: Wed Oct 08, 2008 1:10 am
by Rick Lipkin
James

I think what is happening is that when the e-mail fails .. the SMTP port is not being closed properly .. so when I come back and re-run the same code and send another e-mail .. we get the open port error .. I think this is a 'bug' somewhere in Tsmtp .. I just don't know where to look :(

Rick

PostPosted: Wed Oct 08, 2008 1:17 am
by James Bott
Rick,

Just add an oMail:oSocket:end() after sending the mail to test if this is the problem.

James

PostPosted: Wed Oct 08, 2008 1:20 am
by James Bott
Rick,

>.. is there a way you can look and see if the origional error actually closes the port ??

Yes, it does. See TSMTP method Failure().

James

PostPosted: Wed Oct 08, 2008 1:23 am
by James Bott
Rick,

For more testing try turning on the logfile() in oSocket.

define mail oMail...

oMail:oSocket:cLogfile:="socket.log"
oMail:oSocket:lDebug:=.t.

James

PostPosted: Sun Oct 12, 2008 5:51 pm
by Antonio Linares
Rick,

Do you properly send emails with authentification ?

PostPosted: Sun Oct 12, 2008 6:37 pm
by Rick Lipkin
Antonio

I see where you published the Tsmtp ( failure ) modification in ver 810 .. thank you .. did you also include the mods for the attachments ??

As far as your question on 'authindication' .. I am a bit confused on the context of your question :? ( ok .. just read the other smtp post .. getting up to speed here )

Our Agency Enterprise e-mail system is Novell GroupWise ( mapi .. don't confuse that with smtp ) and our address book is published ( as I understand it ) thru both GroupWise and available thru our ( additional smtp ) LDAP... I hope I am correct in my explaination here.

Just a side note here .. the reason I do not use mapi .. I just don't feel comfortable GroupWise will be our e-mail standard as we are moviing closer to MS Exchange. I chose SMTP as my choice because SMTP will still be around long after GroupWise or Exchange...

Our SMTP is only intranet or internal to our Agency ( some 7k users ) .. the problem I am running into with Tsmtp is when ( within my application ) a user mis-spells a userid within our 'domain' and when I fire off an e-mail .. if the address lookup fails in SMTP .. it just fails and I need a way to trap that in order to recover and to write the failure to a log to be able to review and fix.

Tsmtp just seems to return the error from SMTP ( which is ok ) and we need to find out if Failure() does indeed close the port or if the program trace for the second failure is actually routed thru Failure () .. hense the different failure codes ..

I can not ( to my knowledge ) pre-test or 'authendicate' a valid e-mail address ( unless you have a way I can pre-test the existance of a valid address ?? ) ..

I need to download the latest 8.10 and look at it .. what do I need to change to send with authendication ??

Rick

PostPosted: Sun Oct 12, 2008 7:18 pm
by Antonio Linares
Rick,

>
I see where you published the Tsmtp ( failure ) modification in ver 810 .. thank you .. did you also include the mods for the attachments ??
>

We included the most recent Class TSmtp that we got, but we may be missing the attachments mods.

Regarding "authentification", I asked you as it was asked in http://forums.fivetechsoft.com/viewtopic.php?t=13068 and I wonder if you could help each other.

PostPosted: Sun Oct 12, 2008 7:32 pm
by Rick Lipkin
Antonio

I just e-mailed you the attachment mod fix that Tim Stone so graciously sent me.

I will look at the authendication thread and see if we can share our experiences.

Thanks
Rick

PostPosted: Sun Oct 12, 2008 8:10 pm
by Rick Lipkin
To All watching the two Tsmtp threads .. here is the cross post I just made:

http://www.fivetechsoft.com/forums/view ... 6762#66762

Rick