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 »

Got it. this worked for me

Code: Select all

MsgBody.s          = "Sending an email with PB."+Chr(13)+"Is this a second line?"
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 »

Have you tried CrLf (chr(13) + chr(10)) ?
EDIT you're to fast :wink:
Last edited by gnozal on Tue Oct 19, 2004 1:39 pm, edited 2 times in total.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Works great now :)
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 »

Library update (see first post or thread)
Changes :
- added function PureSMTP_POP3Messages(POP3Server.s, POP3Port.l, POP3UserName.s, POP3UserPassword.s)
Returns number of e-mails at POP3 server [>= 0 , else is error code]
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Kewl, soon, if you add a few more features, we can use this single lib to create a full email client ;) *S*

Keep 'em coming bud.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

GeoTrail wrote:Kewl, soon, if you add a few more features, we can use this single lib to create a full email client ;) *S*

Keep 'em coming bud.
Or my own, customized, spam blocker *dreaming*
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

He he he that is actually something I am currently planning.
My own little tray-icon spam filter ;)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Post by TerryHough »

freedimension wrote:Or my own, customized, spam blocker *dreaming*
Then you will need to also look at the POP3_Library at viewtopic.php?t=11136
GeoTrail wrote: My own little tray-icon spam filter ;)
I know you have already been there since we conversed in that thread.

You may also want to look at viewtopic.php?t=12767
to see how I used POP3_Library to view the contents of my POP3
mailbox without downloading anything. Makes it easy to delete the spam
using something akin to a WebMail handler.

It isn't technically a spam filter, but it may give you some ideas.

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

Post by GeoTrail »

Thanks Terry.
Your help with the POP3 lib has been very valuable :)
And thanks for the link *S*

Hey, maybe we could start some OpenSource projects here?
We could start with a great spam filtering system, then build a cool email client. And maybe even a bundle package with FTP and other usefull apps :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

Hi GeoTrail and all,

I have tried this very usefull lib and it works fine.
However, I noticed that it creates a thread that is never released/killed (why not), but I noticed also that my RAM usage for the app was nearly the double and was never released too after to have sent a single email.

Is there any memory freeing and sanity check in the code ?
Can't you close the additional thread ?
(apparently, by killing manually this thread within the app process, the memory is not released either).

I am just trying to help to improve this very handy lib ;)

regards.
- Registered PB user -

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

Post by gnozal »

AFAIK, there is no thread in the library and the allocated memory should be released. Did you use the PureSMTP_CloseSMTPConnection() function ? It frees the allocated memory.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

Yes I use it upon sucessfull connection Only.

However I am calling all the mail functions stuff from a thread I have created myself, could it be the problem ?

I mean there is the program running, (1 thread), I create another thread which does various functions, and from this thread I send a mail and I close the SMTP connection, but an additional thread is still created and is kept in memory, and the RAM usage has growned twice.

I'll try to submit a working source code when I will have the time.

EDIT : Windows XP SP2
- Registered PB user -

Using PB 4.00
pvmichael
New User
New User
Posts: 4
Joined: Sat May 15, 2004 12:52 pm

Post by pvmichael »

Will SMTP Authentication be implemented in the future?

EDIT: I found a REALLY good explaination for the authentication process here:
http://www.winsockvb.com/forums/printthread.php?t=1369
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

pvmichael wrote:Will SMTP Authentication be implemented in the future?
There is the PureSMTP_OpenPOP3ThenSMTPConnection() function, wich opens connection to POP3 server (authentification) and then to SMTP server. Does it no work for you ?
pvmichael
New User
New User
Posts: 4
Joined: Sat May 15, 2004 12:52 pm

Post by pvmichael »

gnozal wrote:
pvmichael wrote:Will SMTP Authentication be implemented in the future?
There is the PureSMTP_OpenPOP3ThenSMTPConnection() function, wich opens connection to POP3 server (authentification) and then to SMTP server. Does it no work for you ?
No it doesn't work for me. :cry:

I belive the SMTP Authentication will become more and more popular.
Post Reply