I have a Window in which a Thread is running which is setting up an Email and then sending it with CURLEmailMBS. While this Thread is working the Main Window of my App is freezing for a moment and then responsive again and then freezing again, over and over again until the Mail has been sent. YieldTime is set to True.
Does anybody know how i can workaround this please?
I have the following Code in the Run Action of my Thread:
[code] Dim e as new CURLEmailMBS
e.SetFrom “…” // Replaced for Forum
e.Subject = Text_Betreff
e.AddHeader “Mime-Version: 1.0”
e.AddHeader “…” // Replaced for Forum
e.AddReplyTo “…” // Replaced for Forum
e.AddHeader “…” // Replaced for Forum
// e.SMTPPassword = “…” // Replaced for Forum
// e.SMTPUsername = “…” // Replaced for Forum
e.SetServer OptionURL, False
e.AddTo Text_Receipient, “…” // Replaced for Forum
For Each Anhang As FolderItem In Attachments
Dim b As BinaryStream = BinaryStream.Open(Anhang, False)
Dim mb as MemoryBlock = b.read(b.length)
e.AddAttachment mb, EncodingToISO8859MBS(Anhang.Name), “”
Next
dim c as new CURLSMBS
if c.SetupEmail(e) then
c.YieldTime = True
dim er as integer = c.Perform
if er <> 0 then
[/code]
WAG5Cache.DB_WAG4_GetCustomerName contained 2 mySQLPreparedStatements. I replaced them with non prepared statements because no user data is included in the statements. I think it’s working now.
Maybe unrelated, but i just tested my major project in X2015R3 again. If i change prepared statements to unprepared statements the StackOverflow errors reported in <https://xojo.com/issue/41238> also change. I have far too many statements in my project to investigate this further and there are places where the user enters data which is used in statements too, which i can’t replace with unprepared statements. Maybe both Feedback Cases are somehow related to each other?