Powewrbuilder version 2022 R2 build 2819
Rolands SMTP using the cl32.dll, which stopped being supported years ago, works on all computers except
on a HP Laptop Windows 11 Pro, latest version only,
Why does the test SMTP sample NOT WORK on my computer.
Both Rolland's SMTP using cl32.dll and the below work!!!!
https://www.topwizprogramming.com/pbnismtp.html
I get an error code -14 when using port 465, -11 when using port 25
integer li_rc
SMTPClient lnv_SmtpClient
lnv_SmtpClient = CREATE SMTPClient
//Sets the email-sender information
//lnv_SmtpClient.Host = "smtp.testmail.com"
lnv_SmtpClient.Host = ar_server
//messagebox("ar_server", ar_server)
//lnv_SmtpClient.Port = 25
//lnv_SmtpClient.Port = 587
lnv_SmtpClient.Port = lui_port
//messagebox("lui_port", lui_port)
//lnv_SmtpClient.Username = "tester001@testmail.com"
lnv_SmtpClient.Username = ar_send_from_name
//messagebox("ar_send_from_name", ar_send_from_name)
//lnv_SmtpClient.password = "Mypassword001"
lnv_SmtpClient.password = ls_pwd
//messagebox("ls_pwd", ls_pwd)
lnv_SmtpClient.EnableTLS = True
//Sets the email message
//lnv_SmtpClient.Message.SetSender("tester001@testmail.com","Tester001")
lnv_SmtpClient.Message.SetSender(ar_send_from_email, ar_send_from_name)
//lnv_SmtpClient.Message.AddRecipient("tester002@testmail.com")
lnv_SmtpClient.Message.AddRecipient(ar_send_to_email)
lnv_SmtpClient.Message.Subject = "SMTPClient Test Message"
lnv_SmtpClient.Message.TextBody = "SMTPClient example message body"
//Sends the email
li_rc = lnv_SmtpClient.Send()
IF li_rc = 1 THEN
Messagebox('SMTPClient','Mail sent successfully')
ELSE
Messagebox('SMTPClient' ,'Email sending failed. Return ' + String(li_rc) + '.', StopSign!)
END IF
DESTROY lnv_SmtpClient