Sendmail appears to work correctly when running the following code:
Code: Select all
; From PureBasic Mail example
If CreateMail(0, "user1@triservice.es", "Hello !")
SetMailBody(0, "Hello !" + #CRLF$ +
"This is a multi-" + #CRLF$ +
"line mail !")
; Change the recipients to real one
;
AddMailRecipient(0, "user1@triservice.es", #PB_Mail_To)
AddMailRecipient(0, "user2@gmail.com", #PB_Mail_Cc)
; Set the SMTP server to use
;
Result = SendMail(0, "ssl0.ovh.net", 465, #PB_Mail_Asynchronous | #PB_Mail_UseSSL, "user1", "password1")
Repeat
Progress = MailProgress(0)
Delay(300)
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
EndIf
Am I doing something wrong?
Regards