View.ShowMailItem Method (Microsoft.Office.InfoPath)

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
    The addresses for the To field of the e-mail message.
  • destinationCC
    The addresses for the CC field of the e-mail message.
  • destinationBcc
    The addresses for the BCC field of the e-mail message.
  • subject
    The Subject field of the e-mail message.
  • body
    The text for the body of the e-mail message.

Exceptions

Exception type Condition

ArgumentNullException

The parameters passed to this method are null.

ArgumentException

The parameters passed to this method arenot 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 Office InfoPath 2007.

Example

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.");

See Also

Reference

View Class
View Members
Microsoft.Office.InfoPath Namespace