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).
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!
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).
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!
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).
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).