View.ShowMailItem method
Creates an e-mail message containing the current view.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
Syntax
'Declaration
Public MustOverride Sub ShowMailItem ( _
destinationTo As String, _
destinationCC As String, _
destinationBcc As String, _
subject As String, _
body As String _
)
'Usage
Dim instance As View
Dim destinationTo As String
Dim destinationCC As String
Dim destinationBcc As String
Dim subject As String
Dim body As String
instance.ShowMailItem(destinationTo, _
destinationCC, destinationBcc, subject, _
body)
public abstract void ShowMailItem(
string destinationTo,
string destinationCC,
string destinationBcc,
string subject,
string body
)
Parameters
destinationTo
Type: System.StringThe addresses for the To field of the e-mail message.
destinationCC
Type: System.StringThe addresses for the CC field of the e-mail message.
destinationBcc
Type: System.StringThe addresses for the BCC field of the e-mail message.
subject
Type: System.StringThe Subject field of the e-mail message.
body
Type: System.StringThe text for the body of the e-mail message.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The parameters passed to this method are a null reference (Nothing in Visual Basic). |
ArgumentException | The parameters passed to this method are not valid. For example, they are of the wrong type or format. |
Remarks
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.
Examples
In the following example, the ShowMailItem method of the View class is used to create a mail message for the current view.
this.CurrentView,ShowMailItem("someone@example.com", null, null,
"Sample InfoPath Form", "This is a sample InfoPath form.");
Me.CurrentView,ShowMailItem("someone@example.com", String.Empty, _
String.Empty, "Sample InfoPath Form",
"This is a sample InfoPath form.");