Link to home
Start Free TrialLog in
Avatar of godman_polly
godman_polly

asked on

cannot use asp to send email

Hi,

          I would like to use asp to send email, however I always fail with creating the mail object, don't you know what's wrong? The srcipt is as follow.

<%
  Dim message
  Dim MyMail
 
  For Each x In Request.Form
  message =x & ": " & Request.Form(x) & "\n"
  Next
           
  Set MyMail = Server.CreateObject("CDONTS.NewMail")             //error line
  MyMail.From= "yylaw@se.cuhk.edu.hk"
  MyMail.To= "polly@cuhk.edu.hk"
  MyMail.Cc="godman_polly@yahoo.com"
  MyMail.FromName"Polly Law"
  MyMail.Subject="Online Registeration Form Receipt"
  MyMail.Body= message
  MyMail.Send
  set MyMail=nothing
%>


             Besides, could you teach me how to insert a record into a ms accesss 2000 db?
Avatar of anuravi
anuravi

what is exact error?
Avatar of fritz_the_blank
Do you know for certain that you have all the necessary components for CDONTS installed? Are you running SMTP services on the server that is hosting this code? If "No" to either of these questions, your code just won't work.

If that is the case, I can propose another solution if you are interested.

Fritz the Blank
Avatar of godman_polly

ASKER

I don't know. I am using the account form www.brinkster.com. It is not allow to send email.
godman_polly,

in there us no support email without payment member.

regards,
wee siong
godman_polly,

>Besides, could you teach me how to insert a record into a ms accesss 2000 db?

<%
set conn=server.CreateObject("adodb.connection")
conn.Open "Provider=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&Server.MapPath("YourMdb.mdb")

SQLStr = "INsert into table (value1, value2) values ('value1','value2')

Conn.Execute SQLStr

%>

Regards,
Wee Siong
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial