http://aspfaq.com/show.asp?id=2026
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Mark Creelman <> wrote in message
news:...
>
>
>
> Hello all:
>
> How do I convert this ASP mailer script to accept and mail multiple fields
of a form. This will do one field only
> )iMesg.TextBody = Request.Form("body") and it works great.
>
> Seems pretty simple, but I am missing it.
>
>
> NOTE: Server uses "CDO" ONLY. (Not CDONTS)
>
>
> Thankyou for your response.
>
> Mark
>
>
>
> --------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------
>
> <html>
> <body>
> <!--metadata type="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
name="CDO for Windows 2000 Type Library" -->
> <%
>
> On Error Resume Next
>
> 'Execute main code only if a message was submitted
> If Request.Form("send") <> "" Then
>
>
> Set iConf = CreateObject ("CDO.Configuration")
> Set Flds = iConf.Fields
> 'Set and update fields properties
> Flds(cdoSendUsingMethod) = cdoSendUsingPort
> Flds(cdoSMTPServer) = "mail.yourserver.net"
> Flds.Update
>
> Set iMesg = CreateObject("CDO.Message")
> Set iMesg.Configuration = iConf
>
> 'Format and send message
> Err.Clear
>
> iMesg.To = ""
> iMesg.From = Request.Form("from")
> iMesg.Subject = Request.Form("subject")
> iMesg.TextBody = Request.Form("body")
> iMesg.Send
>
> If Err.Number = 0 Then
>
>
> Result = "Message sent"
>
> Else
>
> Result = "Message not sent"
>
> End If
>
> End If
> %>
>
> <h1>CDO Test</h1>
>
> <p>
> <% Response.Write Result %>
>
> <form method=post>
>
> From: <input type=text name=from>
>
> <p>
> Subject: <input type=text name=subject>
>
> <p>
> Message: <br>
> <textarea name=body>Enter your message here.</textarea>
>
> <p>
> <input type=submit name=send value="Send">
>
> </form>
>
> </body>
> </html>
> --------------------------------------------------------------------------
------------------------------
>