I have a link button to send daily report in my asp.net application on click. The code is working perfectly in my system (where code is available). However, after publishing the same code is not working my code and result of out look is attached. Please help
Protected Sub lnkDailyReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkDailyReport.Click
Dim objApp As Outlook.Application = New Outlook.Application()
Dim mail As Outlook.MailItem = Nothing
mail = DirectCast(objApp.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)
Dim target As String = "rpt_DailyReport.aspx?CompanyId=" & Session("CompanyId")
'Render the page
Dim htmlStringWriter As New System.IO.StringWriter()
mail.[To] = ""
mail.Subject = "Daily Report" & DateTime.Now
mail.CC = ""
mail.HTMLBody = htmlStringWriter.ToString()