Sending email with textboxes and a button

  • 12 years ago

    I need you help.

    I want to send an email with a form and textbox and a button. The user will click a button to submit a form.

    see below.

    'body

    shtml = "<html>"

    shtml = shtml & "<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"

    shtml = shtml & "<form method='post' id='frmdetail' name='frmdetail' action='www.iganic.com>"

    shtml = shtml & "<table border='0' cellspacing='0' cellpadding='0'>"

    shtml = shtml & "<tr><td >Name: </td><td><input id='txtName' name='txtName' type='text' /></td></tr>"

    shtml = shtml & "<tr><td >Contact No: </td><td ><input id='txtContact' name='txtContact' type='text' /></td></tr>"

    shtml = shtml & "<tr><td >Email: </td><td ><input id='txtemail' name='txtemail' type='text' /></td></tr>"

    shtml = shtml & "<tr><td colspan='2' ><input id='Submit1' type='submit' value='submit' /><a href='BLOCKED SCRIPTdocument.frmdetail.submit()' >Enter Competition</a> </td></tr>"

    shtml = shtml & "</table></form></body></html>"

     

    dim cdoObj

    set cdoobj = Server.CreateObject("CDONTS.NewMail")

    cdoObj.From = "[email protected]"

    cdoObj.Subject = "Hi check this"

    cdoObj.To = eTo

    cdoObj.BodyFormat = 0

    cdoObj.MailFormat = 0

    cdoObj.Body = eBody

    cdoObj.Send

     

     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.” - Donald Knuth