SMTP TLS setsender
- New
- Issue
- 32-bit
- PowerBuilder (Appeon)
- SMTP
- TLS/SSL
-
Philip Troise
- PowerBuilder
- Friday, 28 November 2025 03:51 PM UTC
Power builder version R2 2022 build 2828.
using the below logic for TLS not functioning properly using setsender. SSL works fine with setsender.
Used setsender to Set the reply email address to a different one than the one used to send it.
I get a return code of 1, meaning its successful.
li_ret = lnv_SmtpClient.Message.SetSender(ar_send_from_email, ar_send_from_name)
But he a reply uses the the email address that was used to send it, NOT the one I indicated in the setsender
In addition, both AddBbc and AddCc just cause an erro and the email never gets sent out.
lnv_SmtpClient.Message.AddBcc("BccTester1@gmail.com" )
lnv_SmtpClient.Message.AddCc("BccTester1@gmail.com" )
Documentation of SMTP TLS
Integer li_rc
SMTPClient lnv_SmtpClient
lnv_SmtpClient = CREATE SMTPClient
//Sets the email-sender information
lnv_SmtpClient.Host = "smtp.testmail.com"
lnv_SmtpClient.Port = 25
lnv_SmtpClient.Username = "tester001@testmail.com"
lnv_SmtpClient.password = "Mypassword001"
lnv_SmtpClient.EnableTLS = False
//Sets the email message
lnv_SmtpClient.Message.SetSender("tester001@testmail.com","Tester001")
lnv_SmtpClient.Message.AddRecipient("tester002@testmail.com")
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
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.