% If Request.Form("title") <> "" Then ' Get the form data name = Request.Form("title") & " " & Request.Form("name") senderEmail = Request.Form("email") subject = "Web site contact" recipient = Request.Form("recipient") body = name & VBCRLF body = body & Request.Form("company name") & VBCRLF body = body & Request.Form("address") & VBCRLF body = body & Request.Form("city") & VBCRLF body = body & Request.Form("county") & VBCRLF body = body & Request.Form("postcode") & VBCRLF body = body & Request.Form("email") & VBCRLF & VBCRLF body = body & Request.Form("comments") & VBCRLF ' 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 ' Enter the sender data msg.From = senderEmail msg.FromName = name ' Note that as addRecipient is method and not ' a property, we do not use an equals ( = ) sign msg.AddRecipient "dom@buzzcreative.co.uk" ' The subject of the message msg.Subject = subject ' And the body msg.body = body ' Now send the message, using the indicated mailserver if not msg.Send("mxhost-1.vi.net" ) then Response.write "
" & msg.log & "" end if ' And we're done! the message has been sent. Response.Redirect "thankyou.htm" End If %>
![]() |
![]() |
||
![]() |
|||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |