% ' mia 18.4.2004 ' Grant, add the location of the pdf files on the server here str10mistakeslocation = "\pdf\10mistakes.pdf" ' 10mistakes stroutsourcinglocation = "\pdf\outsourcing.pdf" ' outsourcing stritbuyerslocation = "\pdf\ojecguide.pdf" ' itbuyers stritrmlocation = "\newsitems\itrm_current.pdf" ' most recent ITRM ' change to address of your own SMTP server 'strHost = "spamfilter.bestpracticegroup.com" strHost = "spamfilter.bestpracticegroup.com" If Request("Send") <> "" Then Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = strHost Mail.From = "response@bestpracticegroup.com" Mail.FromName = "Website" ' mia 18.4.2004 ' if email address is blank, send an email to G with postal details if Request("email") = "" then Mail.AddAddress "assessment@bestpracticegroup.com" Mail.Subject = "New postal publication request from website" if Request("10mistakes") = "requested" then strMailBody = strMailBody & "10mistakes: requested." & chr(13) & chr(10) end if if Request("outsourcing") = "requested" then strMailBody = strMailBody & "outsourcing: requested." & chr(13) & chr(10) end if if Request("itbuyers") = "requested" then strMailBody = strMailBody & "itbuyers: requested." & chr(13) & chr(10) end if if Request("itrm") = "requested" then strMailBody = strMailBody & "itrm: requested." & chr(13) & chr(10) end if strMailBody = strMailBody & "Name: " & Request("Name") & chr(13) & chr(10) strMailBody = strMailBody & "Title: " & Request("Title") & chr(13) & chr(10) strMailBody = strMailBody & "Company: " & Request("company") & chr(13) & chr(10) strMailBody = strMailBody & "Sector: " & Request("sector") & chr(13) & chr(10) strMailBody = strMailBody & "Email: " & Request("email") & chr(13) & chr(10) strMailBody = strMailBody & "Address line one: " & Request("address") & chr(13) & chr(10) strMailBody = strMailBody & "Address line two: " & Request("address2") & chr(13) & chr(10) strMailBody = strMailBody & "City: " & Request("city") & chr(13) & chr(10) strMailBody = strMailBody & "Country: " & Request("country") & chr(13) & chr(10) strMailBody = strMailBody & "Postcode: " & Request("postcode") & chr(13) & chr(10) 'response.write strMailBody ' for testing only Mail.Body = strMailBody Mail.Send ' send message else ' send them the PDFs one by one and send an email to G summarising the request ' NB it would be a good idea to add mail address validation here Mail.AddAddress Request("email") ' Send separate email for each report requested strPath = Server.MapPath(".") if Request("10mistakes") = "requested" then ' send the mail Mail.AddAddress Request("email") Mail.AddAttachment strPath & str10mistakeslocation Mail.Subject = "The little book of IT project mistakes" strMailBody = chr(13) & chr(10) & "Hello from Best Practice Group." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Here is your copy of 'The little book of IT project mistakes' from BPG." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group is a consultancy that helps its clients make sure IT projects come in on budget and work as expected." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "This is the first of a number of free guides we are producing to help clients control runaway IT budgets." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Regards," & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group." & chr(13) & chr(10) strMailBody = strMailBody & "The only guarantee in IT." & chr(13) & chr(10) Mail.Body = strMailBody Mail.Send ' send message Mail.Reset ' reset all address and attachment lists end if if Request("outsourcing") = "requested" then ' send the mail Mail.AddAddress Request("email") Mail.AddAttachment strPath & stroutsourcinglocation Mail.Subject = "The little book of Outsourcing Mistakes" strMailBody = chr(13) & chr(10) & "Hello from Best Practice Group." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Here is your copy of 'The little book of Outsourcing mistakes' from BPG." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group is a consultancy that helps its clients make sure IT projects come in on budget and work as expected." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "This is the third of a number of free guides we are producing to help clients control runaway IT budgets. If you'd like to be know when future booklets are released, you can subscribe to our IT Risk Management newsletter at http://www.bestpracticegroup.com." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Or if you'd like to order print copies, email us or call our helpline - 0845 345 0130." & chr(13) & chr(10) & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Regards," & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group." & chr(13) & chr(10) strMailBody = strMailBody & "The only guarantee in IT." & chr(13) & chr(10) Mail.Body = strMailBody Mail.Send ' send message Mail.Reset ' reset all address and attachment lists end if if Request("itbuyers") = "requested" then ' send the mail Mail.AddAddress Request("email") Mail.AddAttachment strPath & stritbuyerslocation Mail.Subject = "Learning to love OJEC - a guide to buying IT for the UK public sector" strMailBody = chr(13) & chr(10) & "Hello from Best Practice Group." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Here is your copy of 'the little book of Learning to love OJEC' from BPG." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group is a consultancy that helps its clients make sure IT projects come in on budget and work as expected." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "This is the second of a number of free guides are producing to help clients control runaway IT budgets. If you'd like to be know when future booklets are released, you can subscribe to our IT Risk Management newsletter at http://www.bestpracticegroup.com." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Or if you'd like to order print copies, email us or call our helpline - 0845 345 0130." & chr(13) & chr(10) & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Regards," & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group." & chr(13) & chr(10) strMailBody = strMailBody & "The only guarantee in IT." & chr(13) & chr(10) Mail.Body = strMailBody Mail.Send ' send message Mail.Reset ' reset all address and attachment lists end if if Request("itrm") = "requested" then ' send the mail Mail.AddAddress Request("email") Mail.AddAttachment strPath & stritrmlocation Mail.Subject = "ITRM subscription request received - and most recent edition enclosed" strMailBody = chr(13) & chr(10) & "Hello from Best Practice Group." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Thank you for subscribing to our IT Risk Management Newsletter." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "You'll receive new issues bi-monthly and the most recent edition can be viewed at http://www.bestpracticegroup.com/newsitems/itrm_current.htm." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "If you ever want to unsubscribe, please let us know at risk@bestpracticegroup.com." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Back issues of ITRM are also available at www.bestpracticegroup.com/new.htm." & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Regards," & chr(13) & chr(10) & chr(13) & chr(10) strMailBody = strMailBody & "Best Practice Group." & chr(13) & chr(10) strMailBody = strMailBody & "The only guarantee in IT." & chr(13) & chr(10) Mail.Body = strMailBody Mail.Send ' send message Mail.Reset ' reset all address and attachment lists end if Mail.From = "response@bestpracticegroup.com" Mail.FromName = "Website" ' then send one email to G wth details of request. Mail.AddAddress "assessment@bestpracticegroup.com" strMailBody = "" Mail.Subject = "New email publication request from website" if Request("10mistakes") = "requested" then strMailBody = strMailBody & "10mistakes: requested." & chr(13) & chr(10) end if if Request("outsourcing") = "requested" then strMailBody = strMailBody & "outsourcing: requested." & chr(13) & chr(10) end if if Request("itbuyers") = "requested" then strMailBody = strMailBody & "OJEC: requested." & chr(13) & chr(10) end if if Request("itrm") = "requested" then strMailBody = strMailBody & "itrm: requested." & chr(13) & chr(10) end if strMailBody = strMailBody & "Name: " & Request("Name") & chr(13) & chr(10) strMailBody = strMailBody & "Title: " & Request("Title") & chr(13) & chr(10) strMailBody = strMailBody & "Company: " & Request("company")& chr(13) & chr(10) strMailBody = strMailBody & "Sector: " & Request("sector")& chr(13) & chr(10) strMailBody = strMailBody & "Email: " & Request("email")& chr(13) & chr(10) strMailBody = strMailBody & "Address line one: " & Request("address") & chr(13) & chr(10) strMailBody = strMailBody & "Address line two: " & Request("address2") & chr(13) & chr(10) strMailBody = strMailBody & "City: " & Request("city") & chr(13) & chr(10) strMailBody = strMailBody & "Country: " & Request("country") & chr(13) & chr(10) strMailBody = strMailBody & "Postcode: " & Request("postcode") & chr(13) & chr(10) Mail.Body = strMailBody Mail.Send ' send message Mail.Reset ' reset all address and attachment lists end if 'Response.Write "Success!
" ' should take user to a new page or print some acknowledgement that their form was ' submitted successfully End If %>
![]() |
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © Best Practice Group PLC |