Hi!
I have a problem that is probably of my own design, I just dont know how to fix it.
Hope you can give me some pointers.
I have a big Sub in my program. To make it smaller I have taken parts out, but a "wait for" is giving me problems.
My problem is that not all mail is sendt. I guess its because the MAIL-sub isnt finnished before it gets called again)
Is there any way to fix this, other than duplicate the MAIL-code three times in the main BIG sub?
I have a problem that is probably of my own design, I just dont know how to fix it.
Hope you can give me some pointers.
I have a big Sub in my program. To make it smaller I have taken parts out, but a "wait for" is giving me problems.
B4X:
Sub BIGSUB
...Lots of code...
Mail(some variable, email, etc)
..More code...
Mail(some variable, email, etc)
..even more code...
Mail(some variable, email, etc)
End Sub
Sub MAIL(Variable,variable,variable)
...some code that sets up a mail using smtp...
Wait For SMTP_MessageSent(Success As Boolean)
End sub
My problem is that not all mail is sendt. I guess its because the MAIL-sub isnt finnished before it gets called again)
Is there any way to fix this, other than duplicate the MAIL-code three times in the main BIG sub?