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!

Email tidy up possible?

Status
Not open for further replies.

madanthrax

IS-IT--Management
Sep 15, 2001
123
0
0
AT
I have made a small intranet asp application which when a new report is published an email notification should be sent to about 25 people. The recipients email addresses are in an sql table. The recipients change often and the operators with admin rights on the app can update the user list themselves.

I can get the DB addresses to appear on a test asp page using the While .... Wend thingy with a nice semicolon spacer between each address.

However I can't figure out how to put all the addresses into a variable that I can put into the 'To' field of the CDO mail.

I know you could put the whole CDO code into the loop and send 25 individual emails, but this seems messy to me.

Any tidy ideas please?

Thanks in advance for any help.

Anthony

[sub]"Nothing is impossible until proven otherwise"[/sub]​
 
Dim varTo
While Not DB.EOF
varTo = varTo & DB("emailaddress") & "; "
DB.MoveNext()
WEND

Then put varTo varible onto your To field
 
Neat code. Thanks a lot!

[sub]"Nothing is impossible until proven otherwise"[/sub]​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top