Results 1 to 3 of 3

Thread: System.Web.Mail.MailMessage

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    System.Web.Mail.MailMessage

    Guys,

    I am using this to send mail via my app. I am seeing this error when trying to run the code below ?

    Could not access 'CDO.message' object

    Could anybody help with this ?

    Bob

    Code:
      Public Sub sendintemail()
            Dim email As New System.Web.Mail.MailMessage
            email.To = "[email protected]"
            email.From = "Static Bob"
            email.Body = "MessageText"
            email.Subject = CurrentContract.ContractName
            email.BodyFormat = Web.Mail.MailFormat.Text
            System.Web.Mail.SmtpMail.SmtpServer = "10.25.2.24"
            System.Web.Mail.SmtpMail.Send(email)
        End Sub

  2. #2
    Frenzied Member Zakary's Avatar
    Join Date
    Mar 2005
    Location
    Canada, Quebec, Montreal
    Posts
    1,654

    Post Re: System.Web.Mail.MailMessage

    When you lanch the
    System.Web.Mail.SmtpMail.Send(email)
    do it in a
    Try ... Catch
    like this

    VB Code:
    1. Try
    2.    System.Web.Mail.SmtpMail.Send(email)
    3. Catch Ex As Exception
    4.    MessageBox.Show(ex.Message)
    5.     ' Take a look at Ex.InnerException
    6. End Try

    And when the error occur, take a look in the ex.InnerException in the debuger
    you will find the exact error message ...

  3. #3
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: System.Web.Mail.MailMessage

    you will find a solution to your problem on http://www.systemwebmail.com
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width