I'm trying this code, changing the mail informations, and it stays in loop forever.
Code: Select all
If InitNetwork()
If CreateMail(0, "xxxx@xxxx.com.br", "Subject test")
SetMailBody(0, "This is the body...")
AddMailRecipient(0, "xxxxxxxx@gmail.com", #PB_Mail_To)
Debug IsMail(0)
Debug "started...."
Result = SendMail(0, "xxxx.xxxx.com.br", 25 , 1, "xxx@xxxxx.com.br", "xxxxxx")
Repeat
Progress = MailProgress(0)
Delay(300)
Debug Progress
Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
If Progress = #PB_Mail_Finished
MessageRequester("Information", "Mail correctly sent !")
Else
MessageRequester("Error", "Can't sent the mail !")
EndIf
FreeMail(0)
EndIf
Else
Debug "Didnt work...."
EndIf
