%@LANGUAGE = VBSCRIPT%> <% Response.Buffer=True %>
|
" & msg.log & "" ' else ' Response.Write("Upload saved successfully to " & upl.ServerName & " ") end if if Err <> 0 Then Response.Write("Upload failed at " & upl.ServerName) Response.write " " & msg.log & "" Response.write " An error occurred when saving the file on the server. " Response.write " Possible causes include: " Response.write "An incorrect filename was specified. " Response.write " File permissions do not allow writing to the specified area. " Response.write "If the problem persists, send an email to: " Response.write " " end if end if ' 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 - change this after testing msg.From = "registration@northernemployment.com.au" msg.FromName = ( upl.Form("contact_name") & " at " & upl.Form("company_name") ) ' change recipients after testing ' target = upl.form("submit_to") ' if target = "Isa" then ' recipient1 = "gkfitt@spiderweb.com.au" ' ' recipient1 = "isa@northernemployment.com.au" ' recipient2 = "" ' cc = "gkfitt@spiderweb.com.au" ' else ' if target = "Tvl" then ' ' recipient1 = "tvl@northernemployment.com.au" ' recipient1 = "gkfitt@spiderweb.com.au" ' recipient2 = "" ' cc = "gkfitt@spiderweb.com.au" ' else recipient1 = "gkfitt@spiderweb.com.au" ' recipient1 = "isa@northernemployment.com.au" ' recipient2 = "gkfitt@pobox.com" ' recipient2 = "tvl@northernemployment.com.au" cc = "qccs@pobox.com" ' end if 'end if ' Note that as addRecipient is method and not ' a property, we do not use an equals ( = ) sign msg.AddRecipient recipient1 msg.AddRecipient recipient2 msg.AddRecipientCC cc ' The subject of the message subject = "New Vacancy" msg.Subject = subject if not upl.IsEmpty Then msg.AddAttachment upl.Form("attachment") end if msg.Body = "= = = = = Vacancy Details = = = = =" & vbcrlf & vbcrlf msg.appendtext ("Company Name = " & upl.Form("Company_Name") & vbcrlf ) msg.appendtext ("Contact Names = " & upl.Form("contact_name") & vbcrlf ) msg.appendtext ("Position = " & upl.Form("Position") & vbcrlf ) msg.appendtext ("Phone = " & upl.Form("phone") & vbcrlf ) msg.appendtext ("Mobile = " & upl.Form("mobile") & vbcrlf ) msg.appendtext ("Fax = " & upl.Form("Fax") & vbcrlf ) msg.appendtext ("Email = " & upl.Form("email") & vbcrlf ) msg.appendtext ("Street Address 1 = " & upl.Form("SAddress1") & vbcrlf ) msg.appendtext ("Street Address 2 = " & upl.Form("SAddress2") & vbcrlf ) msg.appendtext ("Postal Address 1 = " & upl.Form("PAddress1") & vbcrlf ) msg.appendtext ("Postal Address 1 = " & upl.Form("PAddress2") & vbcrlf ) msg.appendtext ("Company Description = " & upl.Form("company_description") & vbcrlf ) msg.appendtext ("Position = " & upl.Form("Position1") & vbcrlf ) msg.appendtext ("Location = " & upl.Form("Location") & vbcrlf ) msg.appendtext ("Status = " & upl.Form("Status") & vbcrlf ) msg.appendtext ("Start Date = " & upl.Form("Start_Date") & vbcrlf ) msg.appendtext ("Duration = " & upl.Form("Duration") & vbcrlf ) msg.appendtext ("Normal Days = " & upl.Form("Normal_Days") & vbcrlf ) msg.appendtext ("Normal Hours = " & upl.Form("Normal_Hours") & vbcrlf ) msg.appendtext ("Remuneration = " & upl.Form("Remuneration") & vbcrlf ) msg.appendtext ("Licemces = " & upl.Form("licences") & vbcrlf ) msg.appendtext ("Skills = " & upl.Form("skills") & vbcrlf ) msg.appendtext ("Comments = " & upl.Form("comments") & vbcrlf & vbcrlf ) ' Check that either a file is attached or first part of form is completed if upl.IsEmpty and (upl.Form("contact_name") = "") then Response.contenttype = "text/html" Response.write " " Response.write " Please either attach a position description file or complete the on-line form " else ' send the message, using the indicated mailserver if not msg.Send("mail.northernemployment.com.au" ) then Response.write " " & msg.log & "" else Response.write " Thank you " Response.write " These details will be entered into our database. " Response.write "One of our consultants will contact you as soon as possible. " Response.write " To continue, please select from the menu on the left. " Response.write "" end if end if ' And we're done! the message has been sent. %> |