Smuuuuak Gnozal
PureSMTP library : mail & attachments (AUTH supported)
Moderator: gnozal
- Psychophanta
 - Always Here

 - Posts: 5153
 - Joined: Wed Jun 11, 2003 9:33 pm
 - Location: Anare
 - Contact:
 
- DoubleDutch
 - Addict

 - Posts: 3220
 - Joined: Thu Aug 07, 2003 7:01 pm
 - Location: United Kingdom
 - Contact:
 
Now it works fine on Vista! 
			
			
									
									https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
						https://reportcomplete.com <- School end of term reports system
- Psychophanta
 - Always Here

 - Posts: 5153
 - Joined: Wed Jun 11, 2003 9:33 pm
 - Location: Anare
 - Contact:
 
One more point.
From the manual:
			
			
									
									
						From the manual:
But in windows a file name can contain ';' character and that is an inconvenience. Perhaps another separator character like #LF$ or so :roll:Attachements :
- no file attached : Attachements.s = ""
- 1 file attached : Attachements.s = "Filename"
- X files attached : Attachements.s = "Filename1;Filename2;...;FilenameX"
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
 
regards,
Nico
			
			
									
									If you see the private message you understand wyh i have send it as privat message
regards,
Nico
my live space
						- 
				gnozal
 - PureBasic Expert

 - Posts: 4229
 - Joined: Sat Apr 26, 2003 8:27 am
 - Location: Strasbourg / France
 - Contact:
 
Version compiled with PB4.20 beta 1 : http://freenet-homepage.de/gnozal/PureSMTP___.zip (not tested).bobobo wrote:Notice
4.20Beta - Your nice lib throws an PolinkError referring to _PB_Mid (SubSystems also) while trying to compile
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
						- 
				kinglestat
 - Enthusiast

 - Posts: 746
 - Joined: Fri Jul 14, 2006 8:53 pm
 - Location: Malta
 - Contact:
 
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
			
			
									
									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
						Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
- 
				gnozal
 - PureBasic Expert

 - Posts: 4229
 - Joined: Sat Apr 26, 2003 8:27 am
 - Location: Strasbourg / France
 - Contact:
 
You can't.kinglestat wrote:When using the PureSMTP_OpenSMTPConnection with PureSMTP_SetAttachmentCallback how do you abort an email which is being sent?
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

 - Posts: 746
 - Joined: Fri Jul 14, 2006 8:53 pm
 - Location: Malta
 - Contact:
 
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
			
			
									
									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
						Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
- 
				gnozal
 - PureBasic Expert

 - Posts: 4229
 - Joined: Sat Apr 26, 2003 8:27 am
 - Location: Strasbourg / France
 - Contact:
 
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.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
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
						- 
				kinglestat
 - Enthusiast

 - Posts: 746
 - Joined: Fri Jul 14, 2006 8:53 pm
 - Location: Malta
 - Contact:
 
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?
			
			
									
									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
						Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
- 
				gnozal
 - PureBasic Expert

 - Posts: 4229
 - Joined: Sat Apr 26, 2003 8:27 am
 - Location: Strasbourg / France
 - Contact:
 
You can't do anything.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?
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

 - Posts: 4229
 - Joined: Sat Apr 26, 2003 8:27 am
 - Location: Strasbourg / France
 - Contact:
 
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.
			
			
									
									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).