Dim xui As XUI
If countresult >0 Then
Dim res As Int =fx.Msgbox2(perpmainsheet,"SEND EMIAL TO PURCHASING ?","EMAIL SENDING ","YES","","MO",fx.MSGBOX_CONFIRMATION)
If res=fx.DialogResponse.POSITIVE Then
savetomaindb
Try
smtpx.To.Add("a.com")
smtpx.Sender ="s.com"
smtpx.subject = " STOCKORDER EMIAL" & " for Job " & stockjobnr.Text.Trim & "_" & stockpartname.Text.Trim
smtpx.HtmlBody=True
smtpx.body = sb
smtpx.Send
Log("it went thru") see log (capture.png)
Wait For smptx_MessageSent(Success As Boolean)
xui.MsgboxAsync(Success, "Test")
Catch
fx.Msgbox(perpmainsheet,"ERROR SEND EMIAL" & CRLF & LastException,"EMIAL SETTING")
End Try
Else
fx.Msgbox(perpmainsheet,"NO EMAIL SENT PLEASE MAKE SURE THE STOCK IS AVAILABLE","EMIAL NOT SENT")
End If
Else
Log("no email")
End If