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("CDONT S.NewMail" ) //error line
MyMail.From= "yylaw@se.cuhk.edu.hk"
MyMail.To= "polly@cuhk.edu.hk"
MyMail.Cc="godman_polly@ya hoo.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?
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("CDONT
MyMail.From= "yylaw@se.cuhk.edu.hk"
MyMail.To= "polly@cuhk.edu.hk"
MyMail.Cc="godman_polly@ya
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?
what is exact error?
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
If that is the case, I can propose another solution if you are interested.
Fritz the Blank
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
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.conn ection")
conn.Open "Provider=MICROSOFT.JET.OL EDB.4.0;DA TA SOURCE="&Server.MapPath("Y ourMdb.mdb ")
SQLStr = "INsert into table (value1, value2) values ('value1','value2')
Conn.Execute SQLStr
%>
Regards,
Wee Siong
>Besides, could you teach me how to insert a record into a ms accesss 2000 db?
<%
set conn=server.CreateObject("
conn.Open "Provider=MICROSOFT.JET.OL
SQLStr = "INsert into table (value1, value2) values ('value1','value2')
Conn.Execute SQLStr
%>
Regards,
Wee Siong
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.