wsh/asp to send mail with cdo 
Author Message
 wsh/asp to send mail with cdo

hi all-

im new to wsh, so please forgive the ignorance.

i'd like to send out a listserv to about 30000 subscribers whose names
are stored in a sql database using a WSH file that is called from an ASP
page. however, i'd also like to pass parameters to the WSH object, such
as database ID's, message subject/body, etc so that the script knows
what to send & what to process. how would i pass such parameters in the
ASP file to a VBS i've already written using the WSH?

thanks in advance!
nate



Fri, 07 Dec 2001 03:00:00 GMT  
 wsh/asp to send mail with cdo
I am also new to this WSH stuff, but why would you want to call WSH from
your ASP. You can use pretty much use the same code as your WSH file in the
ASP.

Just use ADO to get your records and then use CDO to send email directly
from the ASP. Or you can make this into a COM object which the WSH and ASP
can use.

If you need to know how to send email from CDO, let me know.

Vishi

Quote:

>hi all-

>im new to wsh, so please forgive the ignorance.

>i'd like to send out a listserv to about 30000 subscribers whose names
>are stored in a sql database using a WSH file that is called from an ASP
>page. however, i'd also like to pass parameters to the WSH object, such
>as database ID's, message subject/body, etc so that the script knows
>what to send & what to process. how would i pass such parameters in the
>ASP file to a VBS i've already written using the WSH?

>thanks in advance!
>nate




Fri, 07 Dec 2001 03:00:00 GMT  
 wsh/asp to send mail with cdo
vishi-

believe me ive tried this, but because there are so many users in the
subscription list, i often run into the problem of the script timing out. ive
set the server.scripttimeout value to 10 minutes & more, but the script still
times out occasionally. this is why i wanted to run it from wsh - so i didnt
have to worry about script timeout. thanks for the quick response, though.

nate

Quote:

> I am also new to this WSH stuff, but why would you want to call WSH from
> your ASP. You can use pretty much use the same code as your WSH file in the
> ASP.

> Just use ADO to get your records and then use CDO to send email directly
> from the ASP. Or you can make this into a COM object which the WSH and ASP
> can use.

> If you need to know how to send email from CDO, let me know.

> Vishi


> >hi all-

> >im new to wsh, so please forgive the ignorance.

> >i'd like to send out a listserv to about 30000 subscribers whose names
> >are stored in a sql database using a WSH file that is called from an ASP
> >page. however, i'd also like to pass parameters to the WSH object, such
> >as database ID's, message subject/body, etc so that the script knows
> >what to send & what to process. how would i pass such parameters in the
> >ASP file to a VBS i've already written using the WSH?

> >thanks in advance!
> >nate




Fri, 07 Dec 2001 03:00:00 GMT  
 wsh/asp to send mail with cdo
to pass arguments to a script running under wscript/script, simply include
them in the executed command line.  for example:

myscript.vbs one two "and three"

In myscript.vbs:

wscript.arguments.count ==> 3
wscript.arguments(0) ===> "one"
wscript.arguments(0) ===> "two"
wscript.arguments(0) ===> "and three"

arguments are space delimited.  those with spaces embedded must be enclosed
in double quotes.  embedded double quotes must be doubled ("I said, ""Double
embedded quotes"".") ==> I said, "Double embedded quotes".

any enclosing quotes are _not_ included in the elements of
wscript.arguments.  note that arguments.count is 1-based but the arguments
collection is 0-based.

--
Michael Harris


| hi all-
|
| im new to wsh, so please forgive the ignorance.
|
| i'd like to send out a listserv to about 30000 subscribers whose names
| are stored in a sql database using a WSH file that is called from an ASP
| page. however, i'd also like to pass parameters to the WSH object, such
| as database ID's, message subject/body, etc so that the script knows
| what to send & what to process. how would i pass such parameters in the
| ASP file to a VBS i've already written using the WSH?
|
| thanks in advance!
| nate

|



Fri, 07 Dec 2001 03:00:00 GMT  
 wsh/asp to send mail with cdo
typo ...under wscript/script... should be ...wscript/cscript...

--
Michael Harris


| to pass arguments to a script running under wscript/script, simply include
| them in the executed command line.  for example:
|
| myscript.vbs one two "and three"
|
| In myscript.vbs:
|
| wscript.arguments.count ==> 3
| wscript.arguments(0) ===> "one"
| wscript.arguments(0) ===> "two"
| wscript.arguments(0) ===> "and three"
|
| arguments are space delimited.  those with spaces embedded must be
enclosed
| in double quotes.  embedded double quotes must be doubled ("I said,
""Double
| embedded quotes"".") ==> I said, "Double embedded quotes".
|
| any enclosing quotes are _not_ included in the elements of
| wscript.arguments.  note that arguments.count is 1-based but the arguments
| collection is 0-based.
|
| --
| Michael Harris
|
|

| | hi all-
| |
| | im new to wsh, so please forgive the ignorance.
| |
| | i'd like to send out a listserv to about 30000 subscribers whose names
| | are stored in a sql database using a WSH file that is called from an ASP
| | page. however, i'd also like to pass parameters to the WSH object, such
| | as database ID's, message subject/body, etc so that the script knows
| | what to send & what to process. how would i pass such parameters in the
| | ASP file to a VBS i've already written using the WSH?
| |
| | thanks in advance!
| | nate

| |
|
|



Fri, 07 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ASP & CDO - problem sending SMTP mail

2. How to send E-mail from ASP with CDO

3. Sending Mail from ASP using CDO.dll (outlook 98)

4. Sending mail from ASP/WSH ?

5. Trouble trying to send e-mail using CDO

6. CDO send mail in NT?

7. sending mail with CDO

8. send mail using CDO.message class with attachment

9. sending email using CDO and remote WSH

10. sending email by CDO on WSH

11. how to save mail to outbox use cdo (mail server exchage)

12. sending e-mail using jscript and wsh

 

 
Powered by phpBB® Forum Software