470,855 Members | 1,158 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

ASP Email - clearing out a variable

I've got this code:
With cdoMessage
Set .Configuration = cdoConfig
.From = strEmail
.To = "do*********@disney.com"
.Cc = strmEmail
.Subject = "Maintenance Request"
.TextBody = strBody
.Send
End With

With cdoMessage
Set .Configuration = cdoConfig
.From = "Ma**************@disney.com"
.To = strEmail
.Subject = "Your Maintenance Request"
.HtmlBody = emailBody
.Send
End With

Now notice the second piece doesn't have .Cc, but they ( strmEmail from the
first piece) are still getting the emails.
How do I tell it not to send a .Cc?
I have five different possible values for strmEmail, and whichever one I
pick for the first part, shows up on the second, so I know it is passing the
value, but I don't want it to.

TIA!
Tom
Jul 19 '05 #1
3 1686
Destroy the object and re-create it. It's really keeping all of your
configuration options, but you're over-writing most of them before hitting
send.

Or maybe you could try setting .cc = "" or to NULL?

"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:#p**************@tk2msftngp13.phx.gbl...
I've got this code:
With cdoMessage
Set .Configuration = cdoConfig
.From = strEmail
.To = "do*********@disney.com"
.Cc = strmEmail
.Subject = "Maintenance Request"
.TextBody = strBody
.Send
End With

With cdoMessage
Set .Configuration = cdoConfig
.From = "Ma**************@disney.com"
.To = strEmail
.Subject = "Your Maintenance Request"
.HtmlBody = emailBody
.Send
End With

Now notice the second piece doesn't have .Cc, but they ( strmEmail from the first piece) are still getting the emails.
How do I tell it not to send a .Cc?
I have five different possible values for strmEmail, and whichever one I
pick for the first part, shows up on the second, so I know it is passing the value, but I don't want it to.

TIA!
Tom

Jul 19 '05 #2
..Cc = "" will work. Either that, or you can destroy the cdoMessage object
and recreate it. Or, use the same code and use a strCc variable, and just
make sure you give it a value each time, whether that's "" or an e-mail
address.

Ray at work

"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I've got this code:
With cdoMessage
Set .Configuration = cdoConfig
.From = strEmail
.To = "do*********@disney.com"
.Cc = strmEmail
.Subject = "Maintenance Request"
.TextBody = strBody
.Send
End With

With cdoMessage
Set .Configuration = cdoConfig
.From = "Ma**************@disney.com"
.To = strEmail
.Subject = "Your Maintenance Request"
.HtmlBody = emailBody
.Send
End With

Now notice the second piece doesn't have .Cc, but they ( strmEmail from the first piece) are still getting the emails.
How do I tell it not to send a .Cc?
I have five different possible values for strmEmail, and whichever one I
pick for the first part, shows up on the second, so I know it is passing the value, but I don't want it to.

TIA!
Tom

Jul 19 '05 #3
Thanks guys!

I'll play with both methods


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Woodster | last post: by
7 posts views Thread by Martin Magnusson | last post: by
6 posts views Thread by JJ_377 | last post: by
1 post views Thread by Gary Wessle | last post: by
12 posts views Thread by Avalon1178 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.