<% dim gAddBCC, gAddCC, gAddRecipient, gBodyFormat, gSetImportance gAddBCC = "" gAddCC = "" gAddRecipient = "" gBodyFormat = "" gSetImportance = "" function WAUE_AddAttachment(mailObj,attPath) if (attPath <> "" AND inStr(attPath,".") > 0) then mailObj.AddAttachment attPath end if set WAUE_AddAttachment = mailObj end function function WAUE_AddBCC(mailObj,bccEmail) if (bccEmail <> "") then if (gAddBCC <> "") then gAddBCC = gAddBCC & ";" end if if (InStr(bccEmail, "|WA|")) then dim mailBCCArr mailBCCArr = Split(bccEmail, "|WA|") gAddBCC = gAddBCC & mailBCCArr(1) & " <" & WA_StripSpaces(mailBCCArr(0)) & ">" else gAddBCC = gAddBCC & WA_StripSpaces(bccEmail) end if end if set WAUE_AddBCC = mailObj end function function WAUE_AddCC(mailObj,ccEmail) if (ccEmail <> "") then if (gAddCC <> "") then gAddCC = gAddCC & ";" end if if (InStr(ccEmail, "|WA|")) then dim mailCCArr mailCCArr = Split(ccEmail, "|WA|") gAddCC = gAddCC & mailCCArr(1) & " <" & WA_StripSpaces(mailCCArr(0)) & ">" else gAddCC = gAddCC & WA_StripSpaces(ccEmail) end if end if set WAUE_AddCC = mailObj end function function WAUE_AddRecipient(mailObj,recEmail) if (recEmail <> "") then if (gAddRecipient <> "") then gAddRecipient = gAddRecipient & ";" end if if (InStr(recEmail, "|WA|")) then dim mailRecArr mailRecArr = Split(recEmail, "|WA|") gAddRecipient = gAddRecipient & mailRecArr(1) & " <" & WA_StripSpaces(mailRecArr(0)) & ">" else gAddRecipient = gAddRecipient & WA_StripSpaces(recEmail) end if end if set WAUE_AddRecipient = mailObj end function function WAUE_BodyFormat(mailObj,bodyFormat) gBodyFormat = bodyFormat set WAUE_BodyFormat = mailObj end function function WAUE_Definition(host,port,timeout,username,password) set retVal = Server.CreateObject("CDO.Message") if (host<>"") then retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = host retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 if (isNumeric(port)) then retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = cInt(port) end if end if if (isNumeric(timeout)) then retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = cInt(timeout) end if if (username <> "") then retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = username end if if (password <> "") then retVal.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password end if retVal.Configuration.Fields.Update set WAUE_Definition = retVal end function function WAUE_SendMail(mailObj,mailAttachments,mailBCC,mailCC,mailTo,mailImportance,mailFrom,mailSubject,mailBody) if (mailCC <> "") then mailObj.CC = mailCC end if if (mailBCC <> "") then mailObj.BCC = mailBCC end if mailObj.To = mailTo mailObj.From = mailFrom if (InStr(mailFrom, "|WA|")) then dim mailFromArr mailFromArr = Split(mailFrom, "|WA|") mailObj.From = mailFromArr(1) & " <" & WA_StripSpaces(mailFromArr(0)) & ">" end if mailObj.Subject = mailSubject if (gBodyFormat = 0) then mailObj.HTMLBody = mailBody else if (gBodyFormat = 1) then mailObj.TextBody = mailBody else mailBodyArr = Split(mailBody, "") mailObj.TextBody = mailBodyArr(0) mailObj.HTMLBody = mailBodyArr(1) end if end if mailObj.Fields("urn:schemas:httpmail:importance") = mailImportance mailObj.Fields.Update mailObj.Send set WAUE_SendMail = mailObj end function function WAUE_SetImportance(mailObj,Importance) dim newPriority newPriority = 1 if (NOT IsNumeric(Importance)) then if (UCase(Importance) = "HIGH") then newPriority = 0 end if if (UCase(Importance) = "LOW") then newPriority = 1 end if else Importance = cInt(Importance) if (Importance = 3) then newPriority = 1 else if (Importance = 1) then newPriority = 2 else if (Importance = 5) then newPriority = 0 end if end if end if end if gSetImportance = newPriority set WAUE_SetImportance = mailObj end function %> <% function WA_FormatColumn(align,numspaces,content) dim WAFormatColumn_return WA_FormatColumn_return = "" numspaces = cInt(numspaces) if (Len(content) > numspaces) then WA_FormatColumn_return = Left(content,numspaces) else if (LCase(align) = "right") then WA_FormatColumn_return = WA_RightAlign(numspaces,content) end if if (LCase(align) = "left") then WA_FormatColumn_return = WA_LeftAlign(numspaces,content) end if if (LCase(align) = "center") then WA_FormatColumn_return = WA_CenterAlign(numspaces,content) end if end if WA_FormatColumn = WA_FormatColumn_return end function function WA_RightAlign(numspaces, content) dim WA_RightAlign_return WA_RightAlign_return = content while (Len(WA_RightAlign_return) < numspaces) WA_RightAlign_return = " " + WA_RightAlign_return wend WA_RightAlign = WA_RightAlign_return end function function WA_LeftAlign(numspaces, content) dim WA_LeftAlign_return WA_LeftAlign_return = content while (Len(WA_LeftAlign_return) < numspaces) WA_LeftAlign_return = WA_LeftAlign_return + " " wend WA_LeftAlign = WA_LeftAlign_return end function function WA_CenterAlign(numspaces, content) dim WA_CenterAlign_return WA_CenterAlign_return = content for n=Len(content) to numspaces-1 if ((n Mod 2) = 1) then WA_CenterAlign_return = WA_CenterAlign_return + " " else WA_CenterAlign_return = " " + WA_CenterAlign_return end if next WA_CenterAlign = WA_CenterAlign_return end function function WA_StripSpaces(inStr) dim outStr outStr = Replace(inStr, " ", "") WA_StripSpaces = outStr end function function WA_TrimLeadingSpaces(inStr) dim outStr, firstchar outStr = inStr firstchar = Left(outStr, 1) while (firstchar = " ") outStr = Right(outStr, Len(outStr)-1) firstchar = Left(outStr, 1) wend WA_TrimLeadingSpaces = outStr end function %> <% function WA_Universal_Email_1_SendMail(RecipientEmail) dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject MailAttachments = "" MailBCC = "" MailCC = "" MailTo = "" MailBodyFormat = "" MailBody = "" MailImportance = "" MailFrom = "sales@softpower.com" MailSubject = "Soft-X Download" 'Global Variables gAddBCC = "" gAddCC = "" gAddRecipient = "" gBodyFormat = "" gSetImportance = "" set WA_MailObject = WAUE_Definition("mail.infrontweb.com","25","","","") if (RecipientEmail <> "") then set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail) MailTo = gAddRecipient gAddRecipient = "" else 'To Entries end if 'Attachment Entries 'BCC Entries set WA_MailObject = WAUE_AddBCC(WA_MailObject,"sales@softpower.com") MailBCC = gAddBCC 'CC Entries MailCC = gAddCC 'Body Format set WA_MailObject = WAUE_BodyFormat(WA_MailObject,1) MailBodyFormat = gBodyFormat 'Set Importance set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3") MailImportance = gSetImportance 'Start Mail Body MailBody = MailBody & "Thank you for your interest in Soft-X." & vbCrlf & "" MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & "Use the link below to download your free software." & vbCrlf & "" MailBody = MailBody & "http://www.softpower.com/media/software/InstallXref.zip" & vbCrlf & "" MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & "When download is complete unzip the file and run installer." & vbCrlf & "" MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & "------------------------------------------------------------" & vbCrlf & "" MailBody = MailBody & "NOTE: The following info has been sent to Softpower Sales... " & vbCrlf & "" MailBody = MailBody & " Contact Name: " MailBody = MailBody & Request.Form("contact_name") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " Company Name: " MailBody = MailBody & Request.Form("company_name") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " Address: " MailBody = MailBody & Request.Form("address") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " City: " MailBody = MailBody & Request.Form("city") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " State: " MailBody = MailBody & Request.Form("state") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " Zip Code: " MailBody = MailBody & Request.Form("zip") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " Phone: " MailBody = MailBody & Request.Form("phone") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & " Email: " MailBody = MailBody & Request.Form("email") MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & "" & vbCrlf & "" MailBody = MailBody & "Please send any changes to sales@softpower.com" & vbCrlf & "" MailBody = MailBody & "------------------------------------------------------------" & vbCrlf & "" MailBody = MailBody & "Please direct all Soft-X questions to support@softpower.com." & vbCrlf & "" 'End Mail Body set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody) set WA_MailObject = nothing end function %> <% if ((Request.ServerVariables("Request_Method") = "POST")) then 'WA Universal Email object="CDOSYS" 'Send Loop Once Per Entry WA_Universal_Email_1_SendMail("" & cStr(cStr(Request.Form("email"))) & "") Session("email") = cStr(cStr(Request.Form("email"))) 'Send Mail All Entries if ("soft-x-confirm.asp"<>"") then Response.Redirect("soft-x-confirm.asp") end if end if %> Softpower - Business Solutions
Softpower - Business Solutions
 
Client Login | Site Map
Home Products Services Support News About Us Contact Us
Limited time only ...
Softpower’s Soft-X database software is now available as a free download for a limited time only.
Software details.
Business Management Software
About Us
Soft-X Free Software Download

Contact Name *
Company Name *
Address *
City *
State  *
Zip Code *
Phone ie, 203-234-1234 *
Email *
       * required

 

 
Home  |  Products  |  Services  |  Support  |  News  |  About Us  |  Contact Us
Softpower, Inc
info@softpower.com
Phone 800-535-4031   Fax 860-388-1176
Website created & managed by Infrontweb.com