<%@LANGUAGE = VBSCRIPT%> <% ' 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 = "webmaster@hotmoss.com" msg.FromName = "Hotmoss Website" ' Note that as addRecipient is method and not ' a property, we do not use an equals ( = ) sign msg.AddRecipient "webmaster@hotmoss.com", "Hotmoss Webmaster" ' The subject of the message msg.Subject = "DOMAIN NAME ORDER - from Hotmoss.com" 'add every form element and its value to the email FOR EACH el IN Request.Form msg.appendtext( el & ": " & Request.form(el) & vbcrlf ) NEXT ' Now send the message, using the indicated mailserver if not msg.Send("mail.hotmoss.com" ) then Response.write "
" & msg.log & "
" else 'Response.write "Message sent succesfully!" Response.redirect "thankyou.htm" end if ' And we're done! the message has been sent. %>