<% 'Sample file Form-Email.asp ' Let's you send one an email with one or more attachments. 'Global declarations. 'Get temporary folder Dim ResultHTML 'Create upload form 'Using Huge-ASP file upload 'Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm") 'Using Pure-ASP file upload Dim Form: Set Form = New ASPForm %><% 'Server.ScriptTimeout = 1000 'Do not upload data greater than 10MB. Form.SizeLimit = &HA00000 'Progress bar window will receive the same ID. Form.UploadID = Request.QueryString("UploadID")'{/b} Const fsCompletted = 0 If Form.State = fsCompletted Then 'Completted ResultHTML = ProcessForm ElseIf Form.State > 10 then Const fsSizeLimit = &HD Select case Form.State case fsSizeLimit: ResultHTML = "
Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)
" case else ResultHTML = "
Some form error.
" end Select End If if request.QueryString("Action") = "Cancel" then ResultHTML = "
Upload was cancelled" end if Function TempFolder() Dim FS Set FS = CreateObject("Scripting.FileSystemObject") 'Get temporary folder 'TempFolder = FS.GetSpecialFolder(2) & "\emailtemp" TempFolder = FS.GetSpecialFolder(2) End Function Sub DeleteFile(FileName) Dim FS Set FS = CreateObject("Scripting.FileSystemObject") FS.DeleteFile FileName End Sub Function ProcessForm Dim eFrom, eTo, Subject, Message,lastname,firstname,company,companyaddr,designation,city,state1,zip,countrycode,office,fax,comments,body lastname=Form("lastname") firstname=Form("firstname") company=Form("company") companyaddr=Form("companyaddr") designation=Form("designation") city=Form("city") state1=Form("state") zip=Form("zip") countrycode=Form("countrycode") office=Form("office") fax=Form("fax") comments=Form("comments") body="" body="Last name: " & lastname & chr(13) & chr(10) body= body & "Firstname: "& firstname & chr(13) & chr(10) body= body & "Company: " & company & chr(13) & chr(10) body= body & "Company Address: " & companyaddr & chr(13) & chr(10) body= body & "Designation: " & designation & chr(13) & chr(10) body= body & "City/Town: " & city & chr(13) & chr(10) body= body & "State/Province: " & state1 & chr(13) & chr(10) body= body & "Zip Code: " & zip & chr(13) & chr(10) body= body & "Country Code: " & countrycode & chr(13) & chr(10) body= body & "Office: " & office & chr(13) & chr(10) body= body & "Fax: " & fax & chr(13) & chr(10) body= body & "Comments: " & comments & chr(13) & chr(10) 'get source form fields - From, To, Subject and Message eFrom = Form("email") eTo = "info@regalcad.com" Subject = "Response from www.regal-services.com" Message = body Dim HTML HTML = "
     Server-side ASP script accepted source form with fields and files and email object was created. " HTML = HTML & "
From: " & eFrom & "" HTML = HTML & "
To: " & eTo & "" HTML = HTML & "
Subject: " & Subject & "" HTML = HTML & "
Message: " & Message & "" Dim objNewMail, File, FileName 'Create a new email message Set objNewMail = CreateObject("CDONTS.NewMail") Const CdoMailFormatMime = 0 objNewMail.MailFormat = CdoMailFormatMime 'Save source files to temporary folder 'Add these files to the new e-mail HTML = HTML & "
Attachments:" For Each File In Form.Files.Items 'If source file is specified. If Len(File.FileName) > 0 Then HTML = HTML & "
 " & File.Name & ": " & File.FileName & ", " & File.Length \ 1024 & "kB" FileName = TempFolder & "\" & File.FileName File.SaveAs FileName objNewMail.AttachFile FileName End If Next 'Send the new email objNewMail.Send eFrom, eTo, Subject, Message 'delete temporary files For Each File In Form.Files.Items If Len(File.FileName) > 0 Then FileName = TempFolder & "\" & File.FileName on error resume next DeleteFile FileName End If Next HTML = HTML & "

" ProcessForm = HTML response.redirect ("thankyou.asp?fnam=" & firstname) End Function '{b}get an unique upload ID for this upload script and progress bar. Dim UploadID, PostURL UploadID = Form.NewUploadID 'Send this ID as a UploadID QueryString parameter to this script. PostURL = Request.ServerVariables("SCRIPT_NAME") & "?UploadID=" & UploadID'{/b} %> Cad Conversion : CAD conversion and CAD drafting services , low cost yet value added services
REGAL SERVICES Contact us
About Us
Services
Gallery
Process
Price Matrix
Partners
Careers
FAQ
Contact Us
REGAL SERVICES
LOGO
Request for Free Quote
 
Contact Us
**For Scheduled Interview and Information, Please visit/contact our CAD Studio at
Regal Services
DB-52, Sector-1
Salt Lake Calcutta - 700 064
Tel: # +91 (33) 2321 - 3820
Should you need more information or clarifications, please feel free to get in touch with us at:
Regal Services
35 C.R.Avenue, 1st Floor
Calcutta - 700 012
INDIA
Tel: # +91 (33) 2321 - 3820
# +91 (33) 2334 - 0344
Fax: # +91 (33) 2334 - 5521
eFAX: # +1 208 692 - 1799 (US Number)
General Query: info@regalcad.com
Sales: sales@regalcad.com
Customer Care: support@regalcad.com


Contact Form
*Last Name
*First Name
*Email
*Company
*Company Address
Designation
City/ Town
State/ Province
Zip/ Post Code
Country
Office Telephone
Fax
File Attachment
Attachment 1 :
Your Comments
 
Home | Become a Partner | Gallery | Price Matrix | FAQ | Career| Resource| More Resources
© 2003-2004 Regal Services. All rights reserved.
Home Contact us Sitemap