Results 1 to 4 of 4

Thread: Email BCC issue

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    3

    Email BCC issue

    I am attempting to add a BCC to an automated email.


    The code works fine like this:
    ______________________________________
    Imports System.Web.Mail
    .
    .
    .

    Dim newmsg As New MailMessage
    SmtpMail.SmtpServer() = "mail.myserver.com"
    newmsg.To = "[email protected]"
    newmsg.From = "[email protected]"
    newmsg.Body = "testing123"

    SmtpMail.Send(newmsg.From, newmsg.To, "subject", newmsg.Body)
    ____________________________________




    I am trying to add a BCC like this:
    ____________________________________
    Imports System.Web.Mail
    .
    .
    .

    Dim newmsg As New MailMessage()
    SmtpMail.SmtpServer() = "mail.myserver.com"
    newmsg.To = "[email protected]"
    newmsg.From = "[email protected]"
    newmsg.Body = "my mail"
    newmsg.Bcc = "[email protected]"
    newmsg.Priority = MailPriority.Normal
    newmsg.BodyFormat = MailFormat.Text
    newmsg.Subject = "The Subject"


    SmtpMail.Send(newmsg)

    End Sub
    ____________________________________


    I am getting a "An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll

    Additional information: Could not access 'CDO.Message' object."

    Error ..... Any ideas????


    Thank you,
    - Jim

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    None of your codes works on My XP machine as I have not SMTP installed on my system, and I cant find my XP CD right now to test it. But if I change the SMPT server to another server (other than my own localhost) both works good.
    Last edited by Lunatic3; Mar 6th, 2003 at 06:07 PM.

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    after I switched the servers/mail sender/recipient...it worked fine for me too
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    3

    Thumbs up ** RESOLVED **

    Thank you. The problem was not the code. The mail server I was using had relay restrictions which was killing the process. Once I modified the relay info on the server everything worked fine.


    Thank you for your help!

    - Jim

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