PdcExtensionMail.SendMail

From External Bemet Wiki
Revision as of 13:18, 23 March 2023 by TC (talk | contribs) (Created page with "== Declaration == SendMail as Boolean == Description == Returns true or false whether the email could be generated and sent. == Notes == This method generates an email, and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

SendMail as Boolean

Description

Returns true or false whether the email could be generated and sent.

Notes

This method generates an email, and tries to send it. This function is definately supported for MSGraph. When using SMTP, if a user is executing the script from PdcWin, it will first open the Bemet email form, and the user still has to press 'Send' in order to send it.

If the email could not be generated or sent, this method will return false.

Code example

This code example shows an email that is generated, and filled with a recipient, attachment, subject, and signature. This email is then sent via MSGraph. The user can find it in outlook in the drafts folder.

Dim aEmail As PDCEXT.IExtensionMail = PDC.App.ExtensionMail
aEmail.ForceMSGraph = True
aEmail.AddSignature = True

Dim recipients As IStrings = PDC.App.GetEmptyStringsList
recipients.Add("[email protected]")
aEmail.Recipients = recipients

Dim attachments As IStrings = PDC.App.GetEmptyStringsList
attachments.Add("‪C:\test.txt")
aEmail.Attachments = attachments

aEmail.Subject = "Placeholder"

aEmail.SendMail()

Availability

Available since April 2023(From version 2023.2.1.0)