http://www.csdn.net/Expert/topic/496/496607.shtm
解决方案 »
- VB调用VC dll的问题,参数为指向指针的指针,该怎样转换呢,没有分数了
- 怎么导入并安装数据库脚本
- 怎么让combox里的内容不能编辑?
- 关于可输入组合框的问题,谢谢!
- 什么样的sql语句能实现。
- 哪位高手能帮忙分析一下内存增长问题!
- savepicture问题
- 海军上校在不在,给你欠你的分。
- 数据结构查询
- 我做了一个控件,其中用了Tabstript控件,所以要保证在用户的机器上system目录下有comctl32.ocx,我怎么发布我的控件,也就是说如果用户没有comctl32.ocx,我就要把它拷到用户的system下??请教各位。
- 补分(75+75=150),问题请看http://www.csdn.net/Expert/topic/495/495535.shtm
- 放假了,在广州的CSDN成员可否留下你的联系方式?
' this command button is used to start a
' MAPI session, log on the the
' mail service, attach the created check
' summary text file to a new
' message, send the message and then clo
' se the session
' declare local variables here
Dim strUserId As String
Dim strPassword As String
Dim strFileName As String
Dim strFilePath As String
' set the mouse pointer to indicate the
' app is busy
Screen.MousePointer = vbHourglass
' set the values for the file name and t
' he file path
strFileName = "" ' this is where you would put any file attachments
strFilePath = App.Path & "\"
' set the user name and password propert
' ies on the session control
mapiLogOn.UserName = "JJones" ' network user name and password !
mapiLogOn.Password = "******"
' start a new email session
mapiLogOn.SignOn
Do While mapiLogOn.SessionID = 0
DoEvents ' need To wait until the new session is created
Loop
'create a new message and address it
MAPIMessages1.SessionID = mapiLogOn.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipDisplayName = "Jones,John"
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.RecipAddress = "smtp:[email protected]"
' note that I prefixed the address with
' "smtp". This is required by exchange
' server, or it does not know what servi
' ce to use for outgoing mail.
MAPIMessages1.MsgSubject = "Test of the Email function"
MAPIMessages1.MsgNoteText = " This is a test of the email function, If you" _
& "receive this Then the program has worked successfully." & vbCrLf
' attaching the file
MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText) - 1
' the line above places the attachment a
' t the end of the text.
MAPIMessages1.AttachmentPathName = strFilePath & strFileName
' now send the message
MAPIMessages1.Send False
mapiLogOn.SignOff
MsgBox "File sent To specified receiptent."
' now set the mouse pointer back to norm
' al
Screen.MousePointer = vbNormal
End Sub
为什么我这些程序SEND时它总会弹出一个对话框,说“一程序正以你的名义发送邮件,你想发送吗?”,然后是两个按钮,“发送”,“不发送”。
这是咋回事?真叫人头疼?!!