mailing using ASP.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • karthick

    #1

    mailing using ASP.NET

    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 = "karthickraja@h otmail.com"

    m.To = "karthickraja@h otmail.com"

    m.Subject = "test"

    m.Body = "test"

    'SmtpMail.SmtpS erver = "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(e xc.Message)

    e1.WriteEntry(e xc.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 .LateBoundAcces sHelper.CallMet hod(Object obj, String
    methodName, Object[] args)
    at System.Web.Mail .CdoSysHelper.S end(MailMessage message)
    at System.Web.Mail .SmtpMail.Send( MailMessage message)
    at _305C04.Global. Application_Err or(Object sender, EventArgs e) in
    c:\inetpub\wwwr oot\305C04\Glob al.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!











Working...