创建新的Outlook电子邮件 [英] Create New Outlook Email
问题描述
大家好,
我试图创建新的Outlook电子邮件,但我有iis权限问题,我尝试了所有我认识的事情,请帮助这是代码:< pre lang =c#> Dim OutlookMessage As Outlook.MailItem
Dim AppOutlook As New Outlook.Application
Try
OutlookMessage = AppOutlook.CreateItem(Outlook.OlItemType.olMailItem)
' Dim Recipents As Outlook.Recipients = OutlookMessage.Recipients
' Recipents.Add ( myemail@hotmail.com)
OutlookMessage.To = waleedb@aylait.com
OutlookMessage.Subject = 通过Outlook发送
OutlookMessage.HTMLBody = StrReport
OutlookMessage.Bo dyFormat = Outlook.OlBodyFormat.olFormatHTML
OutlookMessage.Display()
Catch ex As Exception
MsgBox( 无法发送邮件)' 如果您不想要此消息,只需删除这一行
最后
OutlookMessage =没什么
AppOutlook =没什么
结束尝试
我得到了:
由于以下错误,检索CLSID为{0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂失败:80080005服务器执行失败(HRESULT异常:0x80080005(CO_E_SERVER_EXEC_FAILURE))。
谢谢
有两个可能的原因:
1)托管您网站的计算机上根本没有安装Outlook。
2)服务器负载太高了,它们都崩溃了: http://blogs.msdn。 com / b / adioltean / archive / 2005/06/24 / 432519.aspx [ ^ ]
第一种方法很容易解决:安装Outlook on你的网络服务器。
第二个更复杂,但链接包含建议。
Hi Everyone,
iam trying to create new outlook email but i have iis permission problem and i tryied every thing i know please help this is the code :
Dim OutlookMessage As Outlook.MailItem
Dim AppOutlook As New Outlook.Application
Try
OutlookMessage = AppOutlook.CreateItem(Outlook.OlItemType.olMailItem)
' Dim Recipents As Outlook.Recipients = OutlookMessage.Recipients
'Recipents.Add("myemail@hotmail.com")
OutlookMessage.To = "waleedb@aylait.com"
OutlookMessage.Subject = "Sending through Outlook"
OutlookMessage.HTMLBody = StrReport
OutlookMessage.BodyFormat = Outlook.OlBodyFormat.olFormatHTML
OutlookMessage.Display()
Catch ex As Exception
MsgBox("Mail could not be sent") 'if you dont want this message, simply delete this line
Finally
OutlookMessage = Nothing
AppOutlook = Nothing
End Try
and i got:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Thank you
There are two reasons that are likely:
1) Outlook is not installed at all on the computer hosting your website.
2) The server load is too high, and it's all falling apart: http://blogs.msdn.com/b/adioltean/archive/2005/06/24/432519.aspx[^]
The first is sort-of simple to fix: install Outlook on your web server.
The second is more complex, but the link contains suggestions.
这篇关于创建新的Outlook电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!