📄 sendmail.frm
字号:
VERSION 5.00
Object = "{20C62CAE-15DA-101B-B9A8-444553540000}#1.1#0"; "MSMAPI32.OCX"
Begin VB.Form sendmail
Caption = "发送电子邮件"
ClientHeight = 5040
ClientLeft = 60
ClientTop = 348
ClientWidth = 5232
LinkTopic = "Form1"
ScaleHeight = 5040
ScaleWidth = 5232
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "退出程序"
Height = 495
Left = 3000
TabIndex = 7
Top = 4440
Width = 1215
End
Begin VB.Frame Frame1
Caption = "发件箱"
Height = 4212
Left = 0
TabIndex = 1
Top = 0
Width = 5172
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 4
Text = "Text1"
Top = 240
Width = 3012
End
Begin VB.TextBox Text2
Height = 372
Left = 1920
TabIndex = 3
Text = "Text2"
Top = 720
Width = 3012
End
Begin VB.TextBox Text3
Height = 2772
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "sendmail.frx":0000
Top = 1200
Width = 4692
End
Begin VB.Label Label1
Caption = "收件人邮件地址:"
Height = 372
Left = 240
TabIndex = 6
Top = 360
Width = 1452
End
Begin VB.Label Label2
Caption = "主 题:"
Height = 372
Left = 240
TabIndex = 5
Top = 720
Width = 1692
End
End
Begin VB.CommandButton cmdSend
Caption = "发送"
Height = 495
Left = 1800
TabIndex = 0
Top = 4440
Width = 1215
End
Begin MSMAPI.MAPIMessages MAPIMessages1
Left = 840
Top = 4440
_ExtentX = 804
_ExtentY = 804
_Version = 393216
AddressEditFieldCount= 1
AddressModifiable= 0 'False
AddressResolveUI= 0 'False
FetchSorted = 0 'False
FetchUnreadOnly = 0 'False
End
Begin MSMAPI.MAPISession MAPISession1
Left = 360
Top = 4440
_ExtentX = 804
_ExtentY = 804
_Version = 393216
DownloadMail = 0 'False
LogonUI = -1 'True
NewSession = 0 'False
End
End
Attribute VB_Name = "sendmail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdSend_Click()
With MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = Text1.Text
.MsgSubject = Text2.Text
.MsgNoteText = Text3.Text
.SessionID = MAPISession1.SessionID
.Send
End With
MsgBox "邮件发送完毕!", , "发送邮件"
End Sub
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
MAPISession1.SignOn
End Sub
Private Sub Form_Unload(Cancel As Integer)
MAPISession1.SignOff
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -