Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Additional email addresses

Status
Not open for further replies.

PeteCan

Programmer
Jan 15, 2002
60
GB
How do I send an email to more than one recipient using CDO.

I currently have this:

objCDOMail.AddRecipient "Pete Jones" ,"Pete.Jones@yahoo.co.uk"

Which works fine, but I've tried several different options to add others and it won't work

Thanks
 
Just repeat the line for each recipient:

objCDOMail.AddRecipient "Pete Jones" ,"Pete.Jones@yahoo.co.uk"
objCDOMail.AddRecipient "Tom Smith" ,"Pete.Smith@yahoo.co.uk"
objCDOMail.AddRecipient "Chris Jones" ,"Pete.Jones@yahoo.co.uk"

I think this should work, it's how you do it with JMail but i'm not completely au fait with CDONTS. Nick (Software Developer)


nick@retrographics.fsnet.co.uk
nick.price@myenable.com
 
if memory serves me well the addrecipient is used for CDONTS
If in fact it is CDONTS then you use the Cc or Bcc to add contacts
liket his
objCDOMail.Cc = "friend3@address3.com;friend4@address4.com"
objCDOMail.Bcc = "friend5@address5.com;friend6@address6.com"

but if you're not using CDONTS then what HowardMarks said is correct I dare to learn more
admin@onpntwebdesigns.com
 
Here's an easy Script I use.

<%
Dim myMail

Set myMail = Server.CreateObject(&quot;CDONTS.Newmail&quot;)

myMail.From = &quot;name&quot;, &quot;name@your.com&quot;
myMail.To = &quot;party1&quot;, &quot;party1@your.com&quot;; &quot;party2&quot;, &quot;party2@your.com&quot;
myMail.Subject = &quot;Test message&quot;
myMail.Body = &quot;Place message here.&quot;
myMail.Send
Set myMail = Nothing

%>
You can also use:
myMail.Cc
myMail.Bcc

And if you want to send HTML add:
myMail.MailFormat = 0
myMail.BodyFormat = 0
 
I have an access database which has a table called PeriodTable, within this there are three fields:

Field 1 - Contains a number
Field 2 - Contains StartDate of period
Field 3 - Contains EndDate of period

I want to query this table using a 'date' so that I can workout what period that date falls into, so basically I need to check to see which Start and EndDate the 'date' falls into.

I have been trying with

StrSearch=&quot;01/12/03&quot;

strSQL = &quot;SELECT Period &quot; _
& &quot;FROM PeriodTable &quot; _
& &quot;WHERE &quot;&StrSearch&&quot; BETWEEN StartDate &quot; _
& &quot;AND EndDate &quot;

As well as many others, but don't seem to be able to get anywhere
 
Try

Where &quot; & strSearch & &quot;>= startDate and &quot; & strSEarch & &quot;<= EndDate&quot;

 
I have done this and don't get a SQL Error, but don't get anything.
If I amend the code to just do a SELECT Period From PeriodTable then I get a list of the lot so it would suggest that this format is incorrect.
The Database is access so I have amended the date as it needs to be in mm/dd/yy format so this shouldn't be the cause.
 
remember that dates in SQL must be with in the # delimiter ---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top