Click here to Skip to main content
13,091,300 members (52,917 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi to all,

I have developed a software (CRM) and sending quotations from Microsoft Outlook.
All the mail credentials for the mail comes from server pages.
I have used 'Microsoft.Office.Interop' namespace.
Following is the code for reference :-
Imports System.Net
Imports Microsoft.Office.Interop.Outlook
Imports Microsoft.Office.Interop
    Public Function OutlookCall()
        Dim pdfFile As String = "c:\Quotations\Quotation for #" & Session("QType").ToString + " " + Session("CustEnqID").ToString & ".pdf"
        'Take an instance of the Outlook App 
        Dim oOutlook As New Outlook.Application()
        ' Create an instance of the MailItem 
        Dim oMailitem As Outlook.MailItem
        ' Create an instance of the Attachment 
        Dim oAttach As Outlook.Attachment
        oMailitem = oOutlook.CreateItem(Outlook.OlItemType.olMailItem)
        oMailitem.To = Session("EmailID").ToString
        oMailitem.CC = ""
        oMailitem.Subject = "Quotation from Abc Pvt. Ltd."
        oMailitem.Body = "Please download an Attachment for quotation requested Abc Pvt. Ltd."           
        'txtFilepath is a text box that contains the path for attachment. 
        'Attach the file Path to the Mail Item 
        'PING….Displays the Outlook along with the To,Cc,Subject and Attachment 
    End Function

Then I used this function on local machine it works properly, but when I publish this on IIS, it displays an error as :-
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005.

Please guide...
Thanks in Adv.
Posted 29-Jan-12 19:53pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Go Through the below link, here is the example

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This will not work. Because outlook is client side not server side.
you can use Mail Server to sending quotations.
the mail server can be Microsoft Exchange server, or any like gmail,hotmail etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 30 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100