Forums

This topic is locked

hiding email address in dynamic mailto

Posted 06 Mar 2008 18:04:14
1
has voted
06 Mar 2008 18:04:14 Dave Clarke posted:
hi

i have seen loads of extensions and methods to hide email addresses in mailto links but i can't seem to find one that will work with a dynamic mailto.

i know i could use a form for users to send emails and send it with jmail and therefore eliminate the need for the email address on the page at all but it seems a lot of work to simply stop harvesters, surely there is a method to hide the address in a dynamic mailto??

thanks

UD4|DW8.02|DWCS3|ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
www.dogworld-uk.com

Replies

Replied 08 Mar 2008 17:07:20
08 Mar 2008 17:07:20 Javier Castro replied:
What are the methods have seen, can you share?

I saw something interesting where the all the emails are built dinamically. The approach was to create variables

Dim eName, atSign, compName, dotSign, endCom
eName="dave"
atSign="@"
comName="yourcompany"
dotSign = "."
endCom="com"

the on submit the info is passed to another page where there is a form and all the variables are put together then the email is sent.

I hope is enough to start your creative juices flowing and you can figure it out. I personally have not used it, and I don't remember where I saw it, but it made sense to me at that time.

Cheers,

Javier


Javier
"I'm a slow learner and I forget fast" grandpa
DW | FW | ASP | HTML | CSS
Replied 12 Mar 2008 10:31:23
12 Mar 2008 10:31:23 Dave Clarke replied:
this is what i'm going to try, don't know how successful it will be but time will tell

first create this function

<b>&lt;%
function createMailto(strEmail)
dim intCounter 'as integer
dim strNewAddress 'as string
dim arrEmail 'as string
dim strTag 'as string

for intCounter = 1 to len(strEmail)
strNewAddress = strNewAddress & "&#" & asc(mid(strEmail,intCounter,1)) & ";"
next 'iCounter

arrEmail = split(strNewAddress,"&#64;"

strTag = "&lt;script language=""Javascript"" type=""text/javascript""&gt;" & vbCrLf
strTag = strTag & "&lt;!--" & vbcrlf
strTag = strTag & "document.write('&lt;a href=""mai');" & vbcrlf
strTag = strTag & "document.write('lto');" & vbcrlf
strTag = strTag & "document.write(':" & arrEmail(0) & "');" & vbcrlf
strTag = strTag & "document.write('@');" & vbcrlf
strTag = strTag & "document.write('" & arrEmail(1) & """&gt;');" & vbcrlf
strTag = strTag & "document.write('" & arrEmail(0) & "');" & vbcrlf
strTag = strTag & "document.write('@');" & vbcrlf
strTag = strTag & "document.write('" & arrEmail(1) & "&lt;\/a&gt;');" & vbcrlf
strTag = strTag & "// --&gt;" & vbcrlf
strTag = strTag & "&lt;/script&gt;&lt;noscript&gt;" & arrEmail(0) & " at " & vbcrlf
strTag = strTag & Replace(arrEmail(1),"&#46;"," dot " & "&lt;/noscript&gt;"

createMailto = strTag
end function
%&gt;</b>

then where your mailto link is use this

<b>&lt;%=createMailto((recordset.Fields.Item("fldEmail".Value))%&gt;</b>

as you can probably see this splits the mailto up into small pieces so that hopefully the harvesters cannot read it

UD4|DW8.02|DWCS3|ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
www.dogworld-uk.com
Replied 13 Mar 2008 03:19:47
13 Mar 2008 03:19:47 Javier Castro replied:
Did you run few tests on your function???

Javier
"I'm a slow learner and I forget fast" grandpa
DW | FW | ASP | HTML | CSS
Replied 13 Mar 2008 09:30:09
13 Mar 2008 09:30:09 Dave Clarke replied:
I have it set up on a couple of pages and it seems to work fine.. i.e it works as a mailto
only time will tell if it works in hiding email addresses from harvesters

UD4|DW8.02|DWCS3|ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
www.dogworld-uk.com
Replied 14 Mar 2008 18:28:40
14 Mar 2008 18:28:40 Javier Castro replied:
I'll also give it a try. Thanks for sharing the info.

Javier

Javier
"I'm a slow learner and I forget fast" grandpa
DW | FW | ASP | HTML | CSS
This reply was removed on 3/14/2012 8:51:50 AM.
See the changelog
This reply was removed on 4/2/2012 8:49:48 AM.
See the changelog
This reply was removed on 5/9/2012 11:01:44 AM.
See the changelog
This reply was removed on 7/19/2012 4:11:20 PM.
See the changelog

Reply to this topic