PureSMTP library : mail & attachments (AUTH supported)

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

Moderator: gnozal

User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

It works now like a charm in my XP SP2!!!
Smuuuuak Gnozal :D 8)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Now it works fine on Vista! :D
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

One more point.
From the manual:
Attachements :

- no file attached : Attachements.s = ""
- 1 file attached : Attachements.s = "Filename"
- X files attached : Attachements.s = "Filename1;Filename2;...;FilenameX"
But in windows a file name can contain ';' character and that is an inconvenience. Perhaps another separator character like #LF$ or so :roll:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 575
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

Thanks for the great lib!
Works like a charm on W32, XP Prof, here!
:D
cheers,

bembulak
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

Gnozal i have send you a privat message after probs with the SMTP lib.

If you see the private message you understand wyh i have send it as privat message :wink:

regards,
Nico
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

Notice
4.20Beta - Your nice lib throws an PolinkError referring to _PB_Mid (SubSystems also) while trying to compile
사십 둘 .
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

bobobo wrote:Notice
4.20Beta - Your nice lib throws an PolinkError referring to _PB_Mid (SubSystems also) while trying to compile
Version compiled with PB4.20 beta 1 : http://freenet-homepage.de/gnozal/PureSMTP___.zip (not tested).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

:D seems to be ok now

THANK YOU
사십 둘 .
kinglestat
Enthusiast
Enthusiast
Posts: 746
Joined: Fri Jul 14, 2006 8:53 pm
Location: Malta
Contact:

Post by kinglestat »

this is a really nice lib
very easy to use
I am impressed with how you make your tools powerful and yet easy to use

Anyhow, enough of the sweet talk

I have a simple question

When using the
PureSMTP_OpenSMTPConnection
with PureSMTP_SetAttachmentCallback

How do you abort an email which is being sent?
I tried closing connection....but got some really nice crashes

cheers
and keep up the good work
I may not help with your coding
Just ask about mental issues!

http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

kinglestat wrote:When using the PureSMTP_OpenSMTPConnection with PureSMTP_SetAttachmentCallback how do you abort an email which is being sent?
You can't.
The callback is only to show the progression, I didn't think about aborting the mail. Why would you ?
I guess I could stop sending the mail, but I don't know how the SMTP server would react if I send 'end message' while sending an attachment : would he abort the message, send the message without attachment, send a corrupt file ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
kinglestat
Enthusiast
Enthusiast
Posts: 746
Joined: Fri Jul 14, 2006 8:53 pm
Location: Malta
Contact:

Post by kinglestat »

I understand your point
but there must be a way how to close a connection cleanly?
when I try CloseConnection...as I mentioned earlier....I just have a hangup
I may not help with your coding
Just ask about mental issues!

http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

kinglestat wrote:I understand your point
but there must be a way how to close a connection cleanly?
when I try CloseConnection...as I mentioned earlier....I just have a hangup
If you close the connection in the callback (not expected !) the next SendNetworkData() call in the PureSMTP_SendMessage() loop will fail (no current network ID) : so crash.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
kinglestat
Enthusiast
Enthusiast
Posts: 746
Joined: Fri Jul 14, 2006 8:53 pm
Location: Malta
Contact:

Post by kinglestat »

how does outlook do it?
Ie if if sending a large email, and you press cancel, you get lots of red crosses, but email is aborted
I'd like to reproduce that effect if possible with your library
can you guide me on what I should do?
I may not help with your coding
Just ask about mental issues!

http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

kinglestat wrote:how does outlook do it?
Ie if if sending a large email, and you press cancel, you get lots of red crosses, but email is aborted
I'd like to reproduce that effect if possible with your library
can you guide me on what I should do?
You can't do anything.
I have to modify the library...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update (PB 4.xx versions only)

Changes :
- enhanced function PureSMTP_SetAttachmentCallback()
If the callback returns #True (<> #Null), the PureSMTP_SendMessage() function aborts and closes the connection to the SMTP server.
The message is not sent and PureSMTP_SendMessage() returns #PureSMTP_Abort error.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply