Aymen++
04-29-2003, 10:00 PM
with php we use email() funciton, but how we do it with asp?
oracleguy
04-30-2003, 05:28 AM
It can vary sometimes depending on what is setup on your host but most of the time you can use CDONTS.
Try this example out: http://www.asp101.com/samples/email.asp
kalijunfan
04-30-2003, 05:38 AM
Hi Aymen, in order to send email in asp you need to use a component, the most used one is CDONTS that comes with the default installation of Internet Information Server, so most of the Windows hosting services out there already have it installed.
You should use a code like this:
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.Send("from_email@domain.com", "to_email@domain.com", "Subject of the message", "Body of the message", Importance of the message)
Set objMail = Nothing
As you can see this object uses 5 parameters:
1. (String) the From field of the message, the email address that sends it.
2. (String) the To field of the message, one or more email addresses that receives the email message.
3. (String) the subject
4. (String) the text of the message
5. (Long) the importance of the message, 0 = Low, 1 = Normal, 2 = High.
Thatīs all, i hope this can help you.
Regards
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.