Page 10 of 25
Posted: Tue Jan 30, 2007 11:32 am
by DoubleDutch
akj: can you link to an executable and its source.
Make sure you have the latest PB, the latest Pure_SMTP, AND the libs installed from
www.PureBasic.com/beta
I will test it on a machine here that has Windows Me.
It may be a case that somehow your WindowsMe or PureBasic install has been corrupted.
Posted: Tue Jan 30, 2007 11:56 am
by gnozal
Update (both libs)
Changes :
- added function PureSMTP_SkipInitNetwork()
Posted: Tue Jan 30, 2007 12:07 pm
by DoubleDutch
The links to your files on your page are going to a search panel at:
http://freenet-homepage.de
[edit]
Its working now...

Posted: Tue Jan 30, 2007 12:14 pm
by DoubleDutch
The fix for the library works great, thanks!

Posted: Tue Jan 30, 2007 8:09 pm
by akj
DoubleDutch:
I do not understand your sentence "can you link to an executable and its source".
I have the latest version of PB and the beta updates installed and both PB and Windows ME are working fine.
I am using PureSMTP version 5.60 but I will retry my program with version 5.70 when I am back on that PC again.
If you could try on your ME machine I would be grateful as I really would like to use the PureSMTP library.
Posted: Tue Jan 30, 2007 9:27 pm
by DoubleDutch
akj:Do a test program that crashes on your ME system. If you give both the source and the executable, I will compile it as well (thats why we have to be in version sync) and compare the exe's (if yours crashes on my machine and mine does not) - there may be a difference that is resulting in the crash? By link to an executable I mean either PM it me or ftp it somewehre and provide a link to where it is.
Posted: Wed Jan 31, 2007 8:45 am
by gnozal
I could reproduce the PureSMTP_SetXMailer() crash on Win98SE.
It seems to be some strange PB4/Tailbite memory management issue, because :
- the same code works with PB4 on NT based systems
- the same code works with PB3.94 on NT based systems AND Win95 based systems
I think I found the problem : the string variable initialization in PureSMTP_Init() when the library is loaded.
If I avoid this, there is no crash anymore.
Changes :
Code: Select all
ProcedureDLL PureSMTP_Init()
...
; PureSMTP_ContentType = "text/plain; charset=" + #g + "iso-8859-1" + #g
; PureSMTP_XMailer = "PureSMTP"
; PureSMTP_Boundary = "PureSMTP_"
...
EndProcedure
;
Procedure.l PureSMTP_SendMailEx(MailTo.s, MailFrom.s, Subject.s, MsgBody.s, Attachments.s, UserName.s, Password.s, HeaderAddon.s)
...
;
If PureSMTP_XMailer = ""
PureSMTP_XMailer = "PureSMTP"
EndIf
If PureSMTP_ContentType = ""
PureSMTP_ContentType = "text/plain; charset=" + #g + "iso-8859-1" + #g
EndIf
If PureSMTP_Boundary = ""
PureSMTP_Boundary = "PureSMTP_"
EndIf
;
...
EndProcedure
Could you please test
http://freenet-homepage.de/gnozal/PureSMTP_BETA.zip (ANSI PureSMTP beta lib) under Win9x/Me ?
The users with NT based systems too please. If it works, I will update the PB4 library.
Posted: Wed Jan 31, 2007 11:54 am
by akj
DoubleDutch:
I have sent you the files, as requested, but in the light of Gnozal's last post it is likely that any analysis of the files will now be redundant. Many thanks for offering your help, it is really appreciated.
Gnozal:
The Beta library seems to solve the crashout problems under Windows ME. Deep joy! Thank you.
In summary, these now work correctly:
PureSMTP_SetContentType()
PureSMTP_SetXMailer()
PureSMTP_SetTimeOut() - though I think this has always worked
I have not yet tested these:
PureSMTP_SetBoundary()
PureSMTP_AddHeader()
PureSMTP_ClearHeader()
I have two requests:
1. Minor request: Would it be possible for either the X-Mailer to default to <null> rather than "PureSMTP" or for there to be some [other] way of supressing the X-Mailer line?
2. Major request: I need a way of discovering whether a previously created SMTP connection still exists or whether it been unexpectedly lost so that I need to create another. This is to cover the situation where I am automatically sending an email at regular intervals and it seems a waste of resources to create and close the SMTP connection for every email. So I would like to stay connected for the duration of sending all the emails (perhaps over a period of an hour or more), but have a capability of detecting that the connection has unexpectedly become lost before sending my next email.
[Or would opening a new connection do nothing if the previous connection was still open? This may be an indirect way of resolving my request.]
Posted: Wed Jan 31, 2007 2:37 pm
by gnozal
akj wrote:The Beta library seems to solve the crashout problems under Windows ME. Deep joy! Thank you.
Good news.
akj wrote:1. Minor request: Would it be possible for either the X-Mailer to default to <null> rather than "PureSMTP" or for there to be some [other] way of supressing the X-Mailer line?
Actually no. What's the problem ?
akj wrote:2. Major request: I need a way of discovering whether a previously created SMTP connection still exists or whether it been unexpectedly lost so that I need to create another. This is to cover the situation where I am automatically sending an email at regular intervals and it seems a waste of resources to create and close the SMTP connection for every email. So I would like to stay connected for the duration of sending all the emails (perhaps over a period of an hour or more), but have a capability of detecting that the connection has unexpectedly become lost before sending my next email.
[Or would opening a new connection do nothing if the previous connection was still open? This may be an indirect way of resolving my request.]
Why don't you just use the sequence PureSMTP_OpenSMTPConnection() / send mail / PureSMTP_CloseSMTPConnection() each time you send mail ?
Anyway, if you call PureSMTP_OpenSMTPConnection() without having closed the previous connection with PureSMTP_CloseSMTPConnection(), PureSMTP will just keep using current connection.
If the server has disconnected and you try to send some mail, you will get an error, probably #PureSMTP_BadResponse (check PureSMTP_GetLastServerMessage())
Posted: Wed Jan 31, 2007 3:24 pm
by gnozal
Update (PB4 version only)
Changes :
- fixed a strange PB4/Tailbite memory management issue under Win9x/Me
(crashed functions PureSMTP_ContentType() PureSMTP_XMailer() PureSMTP_Boundary())
Posted: Wed Jan 31, 2007 4:19 pm
by akj
Gnozal wrote:
If you call PureSMTP_OpenSMTPConnection() without having closed the previous connection with PureSMTP_CloseSMTPConnection(), PureSMTP will just keep using current connection
This solves my main request. Thank you.
Is there any chance of you adding that important fact to your documentation for PureSMTP_OpenSMTPConnection() and, if appropriate, for PureSMTP_OpenPOP3ThenSMTPConnection().
Posted: Wed Jan 31, 2007 4:39 pm
by gnozal
akj wrote:Is there any chance of you adding that important fact to your documentation for PureSMTP_OpenSMTPConnection() and, if appropriate, for PureSMTP_OpenPOP3ThenSMTPConnection().
I will.
Posted: Mon Mar 05, 2007 4:55 am
by citystate
could someone supply a valid link to PureSMTP, all the ones I've followed timeout (including the one from PureArea)
Thanks
Matt
Posted: Mon Mar 05, 2007 5:23 am
by GeoTrail
Try a different browser!
Posted: Mon Mar 05, 2007 5:20 pm
by citystate
I've tried both the evil IE and the not-so-evil Mozilla, neither want to work - my guess is that gnozal's site is down for whatever reason.
does anyone have this lib (and are prepared to host it?)