PureSMTP library : mail & attachments (AUTH supported)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I tried downloading yesterday and 2 secs ago and it worked fine here.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

citystate wrote: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.
The site is not down, and I have no problems downloading. Maybe a firewall / antivirus problem ?
Anyway, you can also try PureArea (may not be the latest version though) : http://www.purearea.net/pb/english/userlibs.php
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
citystate
Enthusiast
Enthusiast
Posts: 638
Joined: Sun Feb 12, 2006 10:06 pm

Post by citystate »

thanks - I'm still getting the problem though (well, not with the 3.91 version, but definitely with the 4.x one). Doesn't appear to be a firewall problem. :?

oh well - thanks for the effort guys, I'm sure the lib would have been perfect :) guess I'll have to remake the wheel :P

ahh - nevermind, I managed to find it here --> http://www.purearea.net/pb/download/use ... eSMTP_.zip
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post by Kukulkan »

Hi gnozal,

I currently use your library on a PB3.94 project. It works fine, but some people ask for using SSL/TLS for sending e-mails (especially those who are using gmail.com). Is it possible to send and receive e-mails using SSL/TLS? Actualy, only sending is important for me.

I don't know which API's you are using, but maybe it is possible to use InternetOpenUrl_() with the #INTERNET_FLAG_SECURE flag to connect to the server?

regards,

Kukulkan
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Kukulkan wrote:Hi gnozal,
I currently use your library on a PB3.94 project. It works fine, but some people ask for using SSL/TLS for sending e-mails (especially those who are using gmail.com). Is it possible to send and receive e-mails using SSL/TLS? Actualy, only sending is important for me.
I don't know which API's you are using, but maybe it is possible to use InternetOpenUrl_() with the #INTERNET_FLAG_SECURE flag to connect to the server?
I don't use WinAPI, only the purebasic network library functions.
And I don't know the SSL/TLS protocol (I don't know if it's even possible without API).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post by Kukulkan »

gnozal wrote:I don't use WinAPI, only the purebasic network library functions.
And I don't know the SSL/TLS protocol (I don't know if it's even possible without API).
The SSL protocol is well known and documented all over the web, but it is a huge bunch of work to implement this by yourself. The windows-API provides all functions needed to connect using SSL if you are using InternetOpen_(), InternetOpenUrl_() and InternetReadFile_() to manage your connections (instead of the PB functions). Bad news is, that this will only work using windows.

Kukulkan
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

Hi gnozal, many thanks for your nice library.

Could it be possible to add a Trace command for SMTP, as you did in PurePOP3? This could be extremely useful in troubleshooting various problems I came across while using SMTP servers.

Many thanks in advance.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Frontier wrote:Could it be possible to add a Trace command for SMTP, as you did in PurePOP3? This could be extremely useful in troubleshooting various problems I came across while using SMTP servers.
I will think about it. Note that you can use PureSMTP_GetLastServerMessage() to get some information if something went wrong.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

gnozal wrote:
Frontier wrote:Could it be possible to add a Trace command for SMTP, as you did in PurePOP3? This could be extremely useful in troubleshooting various problems I came across while using SMTP servers.
I will think about it. Note that you can use PureSMTP_GetLastServerMessage() to get some information if something went wrong.
Unfortunately, PureSMTP_GetLastServerMessage() returns nothing, but the message is not sent :(
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Frontier wrote:Unfortunately, PureSMTP_GetLastServerMessage() returns nothing, but the message is not sent :(
What error does PureSMTP_SendMail() return ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

gnozal wrote:
Frontier wrote:Unfortunately, PureSMTP_GetLastServerMessage() returns nothing, but the message is not sent :(
What error does PureSMTP_SendMail() return ?
No error.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Frontier wrote:
gnozal wrote:
Frontier wrote:Unfortunately, PureSMTP_GetLastServerMessage() returns nothing, but the message is not sent :(
What error does PureSMTP_SendMail() return ?
No error.
You mean you use PureSMTP_SendMail(), the mail is not send, you get no error (PureSMTP_SendMail() returns #PureSMTP_Ok) and PureSMTP_GetLastServerMessage() returns "" ?
That's strange ... because this means the server does not answer anything so PureSMTP_SendMail() should return #PureSMTP_ServerTimeOut.
The beta library available here http://freenet-homepage.de/gnozal/PureSMTP_BETA.zip creates a log file "PureSMTP_TRACE.txt".
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

gnozal wrote:
Frontier wrote:
gnozal wrote:
Frontier wrote:Unfortunately, PureSMTP_GetLastServerMessage() returns nothing, but the message is not sent :(
What error does PureSMTP_SendMail() return ?
No error.
You mean you use PureSMTP_SendMail(), the mail is not send, you get no error (PureSMTP_SendMail() returns #PureSMTP_Ok) and PureSMTP_GetLastServerMessage() returns "" ?
That's strange ... because this means the server does not answer anything so PureSMTP_SendMail() should return #PureSMTP_ServerTimeOut.
The beta library available here http://freenet-homepage.de/gnozal/PureSMTP_BETA.zip creates a log file "PureSMTP_TRACE.txt".
Exactly like that.

Will try tonight the beta version and post what it returns.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Hello gnozal,

I have an idea for puresmtp.

When using PureSMTP_SendMail with attachment files, it can take some times to finish the operation depending of the size of the attached files.

So i think that the programmer might need to know and display the progress.
It can be done with a user-defined callback, something like this :

Code: Select all

Procedure.l PureSMTP_MyCallback(Percent.l, ServerStatus.l, ServerMessage.s)
  
  Debug "Progress: " + Str(Percent) + " %"
  
EndProcedure

PureSMTP_SetCallback(@PureSMTP_MyCallback())

PureSMTP_SendMail([........])
:idea: :?:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Flype wrote:Hello gnozal,

I have an idea for puresmtp.

When using PureSMTP_SendMail with attachment files, it can take some times to finish the operation depending of the size of the attached files.
So i think that the programmer might need to know and display the progress.
It can be done with a user-defined callback
Done
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply