473,378 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 1719
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robin | last post by:
Ok, I have a form that on clicking of the Update button first updates the specific record in the db, then Inserts if the vMemo field is not empty. The problem that I'm having is that After...
2
by: Woodster | last post by:
I am using std::stringstream to format a string. How can I clear the stringstream variable I am using to "re use" the same variable? Eg: Using std::string std::string buffer; buffer =...
2
by: Charles M. Fish, Sr. | last post by:
I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately. I want to execute a function immediately following a click on <input type="RESET"... ...
7
by: Martin Magnusson | last post by:
I'm having trouble clearing and resizing a static std::vector of std::vectors (segmentation fault). Is it OK to call clear() and resize() on a static attribute? My code is similar to the one posted...
6
by: JJ_377 | last post by:
In a "Save and Quit" button on my web app form (aspx), I have the following code that is supposed to clear a session variable (an user id) and redirect to a logon page: Session.Clear()...
1
by: Gary Wessle | last post by:
hi I have a design problem with this code, it is suppose to take a space delimited data file file_info x( f ); //f is a text file provided below and return the column of choice vector<stringbb...
1
by: RLN | last post by:
Re: Access 2003 I found a method here in the newsgroup that works for clearing checkboxes, but don't understand a particular line of code and how it works. Here is the code: 1. Dim ctrl As...
12
by: Avalon1178 | last post by:
Hi, I have an application that periodically uses a std::string variable which is assigned a VERY VERY large string (15000000+ bytes long). This application is essentially a daemon, and it polls...
16
by: Ed Bitzer | last post by:
Trying to send groups of email with program using System.Net.Mail. I do not clear MailMessage but repeatedly loop changing only the Bcc entries. Works fine if all addresses are valid. As a simple...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.