Is there a way to secure eMail Addresses (??javascript maybe?? ) so they will not be picked up by "s

T

Trevor L.

MVPS Website: http://trevorl.mvps.org/

Yes,

For example, you can set up a function sendEMail which calls myEmail().

Because the name and domain inside myEmail() are not in one string, they are
not recognised by spammers. You can use myEmail() anywhere in a JavaScript
function where you need this Email address to appear

Alter the contents of
userTo
domainTo
domainext
as required

Similarly, sendEMail() can be amended as required,
e.g.
subject
body

function myEmail()
{
var userTo = 'myname'
var domainTo = 'mydomain'
var domainext = '.com'
return userTo + '@' + domainTo + domainext
}
function sendEMail()
{
var text = 'Email Us'
var subject = 'Response from My Home Page'
var body = 'Please enter message here'
document.write
( '<a href="mailto:' + myEmail()
+ '?subject=' + subject
+ '&body=' + body + '">'
+ text + '</a>' )
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top