Hi,
i am using ASP.NET smtpmail class to send a mail programatically. I have
installed CDO (that comes with office XP) , and i have IIS 5.1 (XP pro. SP1)
and SMTP protocol (version build 6015). the SMTP virtual server is running
and SMTP service is running in the machine too.
heres the code:
Imports System.Web.Mail
Dim m As MailMessage = New MailMessage()
m.From = "ka**********@hotmail.com"
m.To = "ka**********@hotmail.com"
m.Subject = "test"
m.Body = "test"
'SmtpMail.SmtpServer = "mailserver"
Try
SmtpMail.Send(m)
Catch exc As Exception
' Response.Write(exc.Message)
Dim e1 As EventLog = New EventLog()
e1.Source = "milage efficiency"
e1.WriteEntry(exc.Message)
e1.WriteEntry(exc.StackTrace)
End Try
the output in the event log is
Could not access 'CDO.Message' object.
and
Event Type: Information
Event Source: milage efficiency
Event Category: None
Event ID: 0
Date: 7/16/2003
Time: 12:36:33 PM
User: N/A
Computer: KARTHICK
Description:
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at _305C04.Global.Application_Error(Object sender, EventArgs e) in
c:\inetpub\wwwroot\305C04\Global.asax.vb:line 79
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I am not sure what the problem is? i think i have cnfigured the SMTP server
properly. please help me out. thanks in advance!