A Goon
Life is just a collection of memories, and memories are like starlight, they go on forever.
- Stanach
Tyler Adams is 13.955 years old.
Modified: August 09 2006.
Hits: 7237937/11054456
User: Anonymous Coward
Time: 0.04 seconds.

Read Message

I don't think wsh can do that, but asp can. [some code]

Author: Tridus ()
Date: 2000-04-11 00:00:00

If you installed the SMTP server with IIS, then you can use the cdonts.newmail object. Here is some code I use to send mail to everybody in the office from a web form on the Intranet:

<%
' this takes an email addres (from a database or a variable or something) and sends it
dim mailobject,from
from = bob@bob.com
set mailobject = server.createobject("cdonts.newmail")
mailobject.to = rs("emailaddy1")
mailobject.from = from
mailobject.subject = request.form("subject")
mailobject.body = request.form("body")
mailobject.send
set mailobject = nothing
%>

the only problem with cdons.newmail is that you have to set it to nothing, and then re-create the object before you can send another mail. So except for declaring it originally, you have to keep doing all of it for each email. A loop is great for that. :)

(I get the from information myself from ADSI, so I just put a line in there saying from = bob@bob.com since you can hard code something as well)

If there were no words, no way to speak... I would still hear you... - Martina McBride

Need a big favor of everybody who doesn't like perverts going after little kids... - Tridus - 2000-04-10 00:00:00
-Cool, i like harrassing ppl - Anonymous - 2000-04-11 00:00:00
-Give me a bit of time... - The Lord DebtAngel - 2000-04-11 00:00:00
--I don't think wsh can do that, but asp can. [some code] - Tridus - 2000-04-11 00:00:00
-I did the basic 'you suck' - RStefan01 - 2000-04-11 00:00:00
-*Watches as this bastard recieves about 30 emails from TerinUnit* - BandWidth - 2000-04-11 00:00:00
-Re:Need a big favor of everybody who doesn't like perverts going after little kids... - Ravage! - 2000-04-10 00:00:00
--Re:Need a big favor of everybody who doesn't like perverts going after little kids... - Az Templar Of Evahl - 2000-04-11 00:00:00
--That works... good to see people are being creative. :) Thanks. - Tridus - 2000-04-10 00:00:00
-Although I don't like using my abilities for destruction, this guys you can consider SCREWED - styx - 2000-04-10 00:00:00
--thanks. - Tridus - 2000-04-10 00:00:00