PdcExtensionMail.SaveAsDraft: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == SaveAsDraft as Boolean == Description == Returns true or false whether the email could be generated and saved. == Notes == This method generates an email,..."
 
mNo edit summary
 
Line 12: Line 12:
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.
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.


<source lang="vb">
Dim aEmail As PDCEXT.IExtensionMail = PDC.App.ExtensionMail
Dim aEmail As PDCEXT.IExtensionMail = PDC.App.ExtensionMail
aEmail.ForceMSGraph = True
aEmail.ForceMSGraph = True

Latest revision as of 13:15, 23 March 2023

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("[email protected]")
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)