感谢您使用微软的产品。
您提出的问题和Outlook的安全特性有关。
为了不出现这个警告提示而直接通过Outlook从其他Office应用程序,如Excel来发送邮件,
(一)、如果您采用Exchange作为您的邮件服务器,您可以借助下面的用Outlook E-mail Security Administrator Package(Admpack.exe)定制自己的Outlook的安全属性的方法来解决:
The Outlook E-mail Security Administrator Package (Admpack.exe) can be installed from the Microsoft Office XP Enterprise CD located in the following folder: \ORK\FILES\PFILES\ORKTOOLS\ORK10\TOOLS\ADMPACK
Customizing the Outlook E-mail Security Update
====================================
Before you begin to modify the security settings, you must create a public folder named "Outlook 10 Security Settings" on your Exchange Server. The administrator must create this folder, using that exact name, in the root folder of the Public Folder tree. You must set the folder Access Control Lists (ACL) so all users can read all items in the folder.
1. On a computer running Outlook, open OutlookSecurity.oft from the file system.
2. When asked to select a folder, select the Outlook 10 Security Settings public folder that you created on Exchange Server. The template will then open in Compose mode.
3. On the Tools menu of the template, point to Forms, and then click Publish Form. (The folder selected should be your current folder, Outlook Security Settings.)
4. In the Form Name box, type "Outlook Security Form".
5. Click the Publish button. The security template is now published in the Security Settings folder.
6. Close the form, and when prompted to save changes, click No.
7. In the Folder List, right-click the Outlook Security Settings folder, and then click Properties on the shortcut menu.
8. In the When posting to this folder, use list, click Outlook Security Form, and then click OK.
9. Click the New button to open up a new security template.
10. Create either a default security setting or custom settings for a specific set of users.
11. Modify the settings in the Programmatic Settings table and Outlook Security Settings table.
Modify the Registry of client
=====================
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
Q256986 Description of the Microsoft Windows Registry
1. Start the registry editor and expand the following sub key:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Security
2. From the Edit menu, choose New, then click DWORD value to add a new registry key. The value name for the key must be CheckAdminSettings.
3. Set the new key value.
No key: means that Outlook uses default administrative settings.
Set to 0: means that Outlook uses default administrative settings.
Set to 1: Outlook looks for custom administrative settings in the Outlook Security Settings folder.
Set to 2: Outlook looks for custom administrative settings in the Outlook 10 Security Settings folder.
Key set to anything else: means Outlook uses default administrative settings.
Please set the value of the key to 2.
For more information, please refer to the following KB article:
Q290499 OL2002: Administrator Info About E-Mail Security Features
(http://support.microsoft.com/support/kb/articles/q290/4/99.asp)
(二)如果您不采用Exchange作为自己的mail server的话,您可以借助CDO编程来不显示这个警告信息而直接调用Outlook发信。具体可以参照如下:
Because if we are developing a Windows service that uses CDO, security prompts will not be generated since CDO detects that it is running in a service and therefore does not display security prompts.
You can refer to the following sample code to resolve the issue:
'This also appears as the "QuickStart" example in "Overview"
Function QuickStart()
Dim objSession As Object ' or Dim objSession As MAPI.Session
Dim objMessage As Object ' or Dim objMessage As Message
Dim objOneRecip As Object ' or Dim objOneRecip As Recipient
On Error GoTo error_olemsg
' create a session then log on, supplying username and password
Set objSession = CreateObject("MAPI.Session")
' change the parameters to valid values for your configuration
objSession.Logon 'profileName:="Jane Doe", _
'profilePassword:="my_pword"
' create a message and fill in its properties
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Subject = "Sample Message"
objMessage.Text = "This is some sample message text."
' create the recipient
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = "John Doe"
objOneRecip.Type = CdoTo
objOneRecip.Resolve
' send the message and log off
objMessage.Update
objMessage.Send showDialog:=False
MsgBox "The message has been sent"
objSession.Logoff
Exit Function
error_olemsg:
MsgBox "Error " & Str(Err) & ": " & Error$(Err)
Resume Next
End Function
For more information in detail, please refer to the following article in the MSDN:
Platform SDK: CDO 1.2.1
Creating and Sending a Message
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_creating_and_sending_a_message.asp )
For additional information about how to avoid the security prompts, please view the article in the Microsoft Knowledge Base:
Q290500 OL2002: Developer Information About E-Mail Security Features Using CDO 1.21s in a Service
(http://support.microsoft.com/default.aspx?scid=kb;en-us;Q290500 )
For additional information about CDO 1.21s Security Features, please refer to the article in the Microsoft Knowledge Base:
Q295302 OL2002: Summary of CDO 1.21s E-mail Security Features
(http://support.microsoft.com/default.aspx?scid=kb;en-us;Q295302 )
For more information about the CDO object model, see the following article on the Microsoft Web site:
(http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/cdo/_olemsg_overview_of_cdo.htm
希望上述信息对您有所帮助。
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。