CDO

They have: 33 posts

Joined: Jul 1999

Hi all.

I'm currently trying to put together an auto-responder, which would basically serve to email someone a password after they've given iunformation for the first time (serves as a first-time login password, basically). What's the best way to do this? I'm very familiar with the CDO object library and have written a few programs with it. My best knowledge is currently in VB/ASP, and therefore with VBScript as well. I'm not sure what the best way to go about doing this is, or if you can, from the server. Thanks in advance.

-Ben C

Ben C
-"The exception...is to tap the unexceptional."

They have: 89 posts

Joined: Sep 1999

You could have a form with information that the are registering with that had an action to an ASP page.

This asp page could then insert your data (or whatever) and then send an email to the person using CDO. Just include the appropriate VBScript to send the mail and thats all you should need to do.

They have: 33 posts

Joined: Jul 1999

RC - Is using CDO the way to go? I figure there's got to be another way, I'm just not aware of it now.

-Ben C

They have: 89 posts

Joined: Sep 1999

There are lots of other ways to send mail to a user. I use the exact function you are talking about with a Coldfusion application right now.

However, since you are familiar with VB and CDO, this is probably the way to go for you. You can directly access the CDO from ASP via VB Script like so:

<% Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.To = "[email protected]"
objCDO.From = "[email protected]"

Dim txtSubject
txtSubject = "TEST! TEST!" & VbCrLf & _
Now()

objCDO.Subject = "TEST!"
objCDO.Body = txtSubject
objCDO.Send

Set objCDO = Nothing
%>

This is a very basic example. For your needs you would have to set FROM to the value of the email from the form and the body would include something like "Your password is"

That is all there is too it. You put this code (or the appropriate code) at the top of the page and every time somebody submits the form to that page, they are automatically emailed thier password. (or whatever).

Let me know if you have any questions.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.