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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cdosys and hiding recipient email addresses 1

Status
Not open for further replies.

sdagger2

Programmer
May 5, 2008
39
GB
Hi

I am sending out an email newsletter to around 100 emails stored in an access database. All works fine but when the recipient receives the email, he/she can see all recipients that the email was sent to.

Is there a way to hide all the To: email addresses? Surely there must be an easy way?

Thank you for any help you can give.
 
As easy as that is it? I thought there may be another attribute or feature of CDOSYS that caters for this. But never thought of it being as simple as that.

Thanks
 
I am now wondering that using the BCC is a good idea, but doing so will leave the normal To: field blank. I don't believe this can be left blank can it? and some hosting providers don't like you using an email address being the same as the from: and not sent.

Any advise?
 
Insert "Undisclosed Recipients" in the To: field, followed by your email address in "<,>" braces.

* The To: field should look like: "Undisclosed Recipients <me@example.com>".
* If you send emails to undisclosed recipients frequently, you can add your own email address to your address book with "Undisclosed" as the first and "recipients" as the last name. Instead of filling in the To: field manually, you can then use the address book entry.
 
^ the other method is to place your "send" in a loop and send each recipient their own email:

Here is a general way to do this, you'll have to make adjustments to make it work with your db and your mailer object.

Code:
sql = "select * from myEmailTable"
set rs = conn.execute(sql)
rs.movefirst
 strEmail = "This is my email body"
 do while not rs.eof
  set m = server.createobject(myemailobject)
   with m
    .to = rs("emailField")
    .from = me@mydomain.com
    .subject = "my email subject"
    .body = strEmail
    .send
    .close
   end with
  set m = nothing
 if not rs.eof the rs.movenext
loop
rs.close
set rs = nothing


--------

GOOGLE is a great resource to find answers to questions like "how do i..."


--------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top