|
-
Mar 6th, 2003, 03:36 PM
#1
Thread Starter
New Member
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
-
Mar 6th, 2003, 04:58 PM
#2
Frenzied Member
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.
-
Mar 6th, 2003, 05:10 PM
#3
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"
-
Mar 7th, 2003, 11:29 AM
#4
Thread Starter
New Member
** 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|