共用方式為


MailItem.Send Method (Outlook)

Sends the e-mail message.

Syntax

expression .Send

expression A variable that represents a MailItem object.

Remarks

The Send method sends an item using the default account specified for the session. In a session where multiple Microsoft Exchange accounts are defined in the profile, the first Exchange account added to the profile is the primary Exchange account, and is also the default account for the session. To specify a different account to send an item, set the SendUsingAccount property to the desired Account object and then call the Send method.

Example

If you use Microsoft Visual Basic Scripting Edition (VBScript) in an Outlook form, you do not create the Application object, and you cannot use named constants. This example shows how to forward a mail item using VBScript code.

Sub CommandButton1_Click() 
 Set myNameSpace = Application.GetNameSpace("MAPI") 
 Set myFolder = myNameSpace.GetDefaultFolder(6) 
 Set myForward = myFolder.Items(1).Forward 
 myForward.Recipients.Add "Laura Jennings" 
 myForward.Send 
End Sub

See Also

Concepts

MailItem Object Members

MailItem Object

How to: Send an E-mail Given the SMTP Address of an Account

Other Resources

How to: Send an E-mail Given the SMTP Address of an Account