TextBody
property for PowerScript controls
Applies to
MimeMessage object in Objects and Controls
Description
Gets or sets the message body in HTML format, which may link to any
LinkedResources.
Usage
In scripts
The TextBody property takes a string value. The following example
sends an email using plain-text formatted message body. In this example,
you don’t need to set the HtmlBody property after the TextBody property is
set.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
Integer li_rc SMTPClient lnv_SmtpClient lnv_SmtpClient = CREATE SMTPClient //set the email account information lnv_SmtpClient.Host = "smtp.gmail.com" lnv_SmtpClient.Port = 587 lnv_SmtpClient.Username = "tester001.appeon@gmail.com" lnv_SmtpClient.password = "Mypassword001" lnv_SmtpClient.EnableTLS = True //set the email message lnv_SmtpClient.Message.SetSender("tester001.appeon@gmail.com","Tester001") lnv_SmtpClient.Message.AddRecipient("tester002.appeon@gmail.com") lnv_SmtpClient.Message.Subject = "SMTPClient Test Message" lnv_SmtpClient.Message.TextBody = "SMTPClient example message body" //send 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 |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest