<%@LANGUAGE = VBSCRIPT%> <% 'Collect form fields and their data For Each x In Request.Form message=message & x & ": " & Request.Form(x) & VBCrLf Next ' Create the JMail message Object set msg = Server.CreateOBject( "JMail.Message" ) ' Set logging to true to ease any potential debugging ' And set silent to true as we wish to handle our errors ourself msg.Logging = true msg.silent = true ' Most mailservers require a valid email address for the sender msg.From = "THIS SHOULD BE YOUR E-MAIL ADDRESS" msg.FromName = "THIS SHOULD BE YOUR NAME" ' Next we have to add some recipients. msg.AddRecipient "YOUR FORM WILL BE SEND TO THE E-MAIL ADDRESS WRITTEN HERE" ' The subject of the message msg.Subject = "CHANGE THE SUBJECT LINE OF THE MESSAGE" ' Note the use of VBCrLf to add linebreaks to our email msg.Body = "Results of your web form:" & VBCrLf & VBCrLf & message & VBCrLf ' To capture any errors which might occur, we wrap the call in an IF statement ' Replace ENTERYOURDOMAINHERE with your domain name, like yourdomain.com if not msg.Send("mail.ENTERYOURDOMAINHERE" ) then 'This message is displayed if an error occurs Response.write "An error occured. Please contact the webmaster of this site." else 'This message is displayed if the message has been sent successfully Response.write "Thank you for your submission.... Your message has been delivered successfully." end if ' And we're done! the message has been sent. %>