Forum Moderators: open

Message Too Old, No Replies

how to send data to email using asp

is anything to configure in my machine

         

nisha albert

5:30 am on Feb 6, 2006 (gmt 0)

10+ Year Member




hi..

all i want is, to send data to a specified email.

i have some details in my database...

i want to send it to a specified email using asp..

i am using windows 2000 professional and MS SQL 2000

is there anything to configure in my machine.

i don't know how to do it..

plzzzz.. can anybody help..

thanks in advance..

Frunobulax

5:29 pm on Feb 9, 2006 (gmt 0)

10+ Year Member



You've probably found the answer by now, but depending on your Win2k version you'll need to use CDONTS or CDOSYS to send the email. If I remember correctly, CDONTS is probably the one that works with Win2k Pro.

<%
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = "recipient@domain.#*$!"
objCDO.From = "sender@domain.xxx"
objCDO.Subject = "Subject Line"
objCDO.Body = "Body"
objCDO.Send
%>

So, essentially you'd want to create a recordset and substitute database field values for whichever parts of the message vary.