PdcExtensionMail.SaveAsDraft
Jump to navigation
Jump to search
Declaration
SaveAsDraft as Boolean
Description
Returns true or false whether the email could be generated and saved.
Notes
This method generates an email, and tries to save it as a draft. This function only works for MSGraph! When using SMTP, it will open the Bemet email form if available.
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 saved as a draft 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("test@outlook.com")
aEmail.Recipients = recipients
Dim attachments As IStrings = PDC.App.GetEmptyStringsList
attachments.Add("C:\test.txt")
aEmail.Attachments = attachments
aEmail.Subject = "Placeholder"
aEmail.SaveAsDraft()
Availability
Available since April 2023(From version 2023.2.1.0)