close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

STARTTLS in classic asp

Thread began 3/16/2021 12:54 pm by sharon39426 | Last modified 3/22/2021 1:58 pm by Ray Borduin | 71 views | 5 replies |

sharon39426

STARTTLS in classic asp

Hi. I have older versions of your extensions and none of them will install in the current version of Dreamweaver. I need to add STARTTLS to an email page using classic asp, but can't figure out how. If I upgrade to the latest versions, will I be able to add STARTTLS? My database is SQL Server--is that supported, or does everything have to be MySQLi (I have to use SQL Server). Do your current extensions use classic asp, or would I need to move to PHP? If the updated extensions can't help me, would someone be able to do this for me with one of your $99 support sessions? Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

Dreamweaver and our extensions no longer work with classic asp.

I don't think they would help with STARTTLS anyway, that would have to be hand coded even if the extensions installed.

I could try to help in a $99 session. Do you have sample code for how to integrate STARTTLS?

Sign in to reply to this post
Did this help? Tips are appreciated...

sharon39426

All I found was Mail.TLS = True but no idea where to put it

<!--#include file="WA_Universal_Email/AspEmail_VB.asp" -->

<%
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 = "TRAIN TRACK|WA|" & cStr((mailserver.Fields.Item("MailFrom").Value)) & ""
MailSubject = "Reset Password"

'Global Variables
gBodyFormat = ""

set WA_MailObject = WAUE_Definition("" & cStr((mailserver.Fields.Item("mailserver").Value)) & "","" & cStr((mailserver.Fields.Item("mailport").Value)) & "","" & cStr((mailserver.Fields.Item("mailuser").Value)) & "","" & cStr((mailserver.Fields.Item("mailpswd").Value)) & "")

if (RecipientEmail <> "") then
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
else
'To Entries
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,"" & cStr((UserEmail.Fields.Item("Email").Value)) & "")
end if

'Attachment Entries

'BCC Entries

'CC Entries

'Character Set

'Body Format
set WA_MailObject = WAUE_BodyFormat(WA_MailObject,1)
MailBodyFormat = gBodyFormat

'Set Importance
set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3")

'Start Mail Body
MailBody = MailBody & "Click the link to reset your password: http://"& cStr(Request.ServerVariables("HTTP_HOST")) & Left(cStr(Request.ServerVariables("URL")),(Len(cStr(Request.ServerVariables("URL")))-20)) & "UserNewPswd.asp?Hashpass=" & cstr((Recordset1.Fields.Item("HashPass")))& "&StaffID="&cstr((Recordset1.Fields.Item("staffid")))

'End Mail Body

set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody)

set WA_MailObject = nothing
end function
%>

I would love to fix this one issue, but then going forward it sounds like I need to move to PHP. Do your extensions work in Dreamweaver with PHP and SQL Server? Thank you

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the page: WA_Universal_Email/AspEmail_VB.asp

I should be able to figure out what the correct syntax is by looking at that page.

Sign in to reply to this post
Did this help? Tips are appreciated...

sharon39426

<%
dim gBodyFormat, gOneToAddress
gBodyFormat = ""
gOneToAddress = false

function WAUE_AddAttachment(mailObj,attPath)
if (WAUE_isAttachment(attPath)) then
mailObj.AddAttachment attPath
end if
set WAUE_AddAttachment = mailObj
end function

function WAUE_SetCharset(mailObj,charSet)
mailObj.CharSet = charSet
set WAUE_SetCharset = mailObj
end function

function WAUE_AddBCC(mailObj,bccEmail)
if (bccEmail <> "") then
emailArr = Split(cStr(bccEmail), ";")
for bcc=0 to UBound(emailArr)
if (InStr(cStr(emailArr(bcc)), "@")) then
emailArr2 = Split(cStr(emailArr(bcc)), "|WA|")
if (UBound(emailArr2) = 0) then
if (WAUE_isEmailAddress(emailArr(bcc))) then
mailObj.AddBCC WA_StripSpaces(cStr(emailArr(bcc)))
end if
else
if (InStr(emailArr2(1), "@")) then
if (WAUE_isEmailAddress(emailArr2(1))) then
mailObj.AddBCC WA_StripSpaces(emailArr2(1)), WA_TrimLeadingSpaces(emailArr2(0))
end if
else
if (WAUE_isEmailAddress(emailArr2(0))) then
mailObj.AddBCC WA_StripSpaces(emailArr2(0)), WA_TrimLeadingSpaces(emailArr2(1))
end if
end if
end if
end if
next
end if

set WAUE_AddBCC = mailObj
end function

function WAUE_AddCC(mailObj,ccEmail)
if (ccEmail <> "") then
emailArr = Split(cStr(ccEmail), ";")
for cc=0 to UBound(emailArr)
if (InStr(cStr(emailArr(cc)), "@")) then
emailArr2 = Split(cStr(emailArr(cc)), "|WA|")
if (UBound(emailArr2) = 0) then
if (WAUE_isEmailAddress(emailArr(cc))) then
mailObj.AddCC WA_StripSpaces(cStr(emailArr(cc)))
end if
else
if (InStr(emailArr2(1), "@")) then
if (WAUE_isEmailAddress(emailArr2(1))) then
mailObj.AddCC WA_StripSpaces(emailArr2(1)), WA_TrimLeadingSpaces(emailArr2(0))
end if
else
if (WAUE_isEmailAddress(emailArr2(0))) then
mailObj.AddCC WA_StripSpaces(emailArr2(0)), WA_TrimLeadingSpaces(emailArr2(1))
end if
end if
end if
end if
next
end if

set WAUE_AddCC = mailObj
end function

function WAUE_AddRecipient(mailObj,recEmail)
if (recEmail <> "") then
emailArr = Split(cStr(recEmail), ";")
for rec=0 to UBound(emailArr)
if (InStr(cStr(emailArr(rec)), "@")) then
emailArr2 = Split(cStr(emailArr(rec)), "|WA|")
if (UBound(emailArr2) = 0) then
if (WAUE_isEmailAddress(emailArr(rec))) then
mailObj.AddAddress WA_StripSpaces(cStr(emailArr(rec)))
gOneToAddress = true
end if
else
if (InStr(emailArr2(1), "@")) then
if (WAUE_isEmailAddress(emailArr2(1))) then
mailObj.AddAddress WA_StripSpaces(emailArr2(1)), WA_TrimLeadingSpaces(emailArr2(0))
gOneToAddress = true
end if
else
if (WAUE_isEmailAddress(emailArr2(0))) then
mailObj.AddAddress WA_StripSpaces(emailArr2(0)), WA_TrimLeadingSpaces(emailArr2(1))
gOneToAddress = true
end if
end if
end if
end if
next
end if

set WAUE_AddRecipient = mailObj
end function

function WAUE_BodyFormat(mailObj,bodyFormat)
if (bodyFormat = 0 OR bodyFormat = 2) then
mailObj.IsHTML = true
end if

gBodyFormat = bodyFormat

set WAUE_BodyFormat = mailObj
end function

function WAUE_Definition(remHost,port,login,pword)
set retVal = Server.CreateObject("Persits.MailSender")
retVal.Host = remHost

if (port <> "") then
retVal.Port = cInt(port)
end if

if (login <> "") then
retVal.UserName = login
retVal.Password = pword
end if
gOneToAddress = false
set WAUE_Definition = retVal
end function

function WAUE_SendMail(mailObj,mailAttachments,mailBCC,mailCC,mailTo,mailImportance,mailFrom,mailSubject,mailBody)
if (gOneToAddress) then
if (InStr(mailFrom, "|WA|")) then
dim mailFromArr
mailFromArr = Split(mailFrom, "|WA|")
for f=0 to UBound(mailFromArr)
if (InStr(cStr(mailFromArr(f)), "@")) then
mailObj.From = mailFromArr(f)
else
mailObj.FromName = mailFromArr(f)
end if
next
else
mailObj.From = mailFrom
end if

if (gBodyFormat = 2) then
mailBodyArray = Split(mailBody, "<multipartbreak>")
mailBody = mailBodyArray(1)
mailObj.AltBody = mailBodyArray(0)
end if
mailObj.Body = mailBody

mailObj.Subject = mailSubject

mailObj.Send()
end if
set WAUE_SendMail = mailObj
end function

function WAUE_SetImportance(mailObj,Importance)
dim newPriority
newPriority = 3
if (NOT IsNumeric(Importance)) then
if (UCase(Importance) = "HIGH") then
newPriority = 1
end if
if (UCase(Importance) = "LOW") then
newPriority = 5
end if
else
newPriority = cInt(Importance)
end if

mailObj.Priority = newPriority
set WAUE_SetImportance = mailObj
end function%>

Sign in to reply to this post

Ray BorduinWebAssist

I think you can add it after this line:

set WA_MailObject = WAUE_BodyFormat(WA_MailObject,1)

like:

WA_MailObject.TLS = True

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...