Click to See Complete Forum and Search --> : sending email from a web form


martha
10-06-2004, 05:40 PM
Please, help me out, is there anything wrong with the code I'm using?

<%
theSchema="http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig=server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(theSchema & "sendusing")=2
cdoConfig.Fields.Item(theSchema & "smtpserver")="smtp.freemail.gr"
cdoConfig.Fields.Update

set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration=cdoConfig

cdoMessage.From=Request.Form("mail_address")
cdoMessage.To="antonioum@freemail.gr"
cdoMessage.Subject=Request.Form("subject")
cdoMessage.TextBody=Request.Form("message")
cdoMessage.Send

Set cdoMessage=Nothing
Set cdoConfig=Nothing
%>

It just won't work

chrismartz
10-06-2004, 05:50 PM
do you get an error when you submit the form or does it just not send an email?

martha
10-07-2004, 02:06 AM
I get an error on submiting, page cannot be dispayed and a code 0801and something like that which i cannot remember right now. I think that something is wrong with enabling full access to Internet Users...

pakiboy
10-11-2004, 06:57 AM
same problem with me

chrismartz
10-12-2004, 07:36 PM
make sure you have rights with that email address to do this email function...contact the system admin for more information likely!