Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create email link without using the mailto option

Status
Not open for further replies.

3112005

Technical User
Nov 28, 2005
58
US
I have an email address that displays from a database based on criteria.

If user Id = this and location = this then display email

I've got the code working so that it displays the right email, but I can't get it to hyperlink and open an new email message when clicked on.

I tried using the mailto option without sucess and someone told me that wasn't a good idea, as my company site would get spammed through the address.

Is there a different way to do this? If so, can you look at the code I have and tell me how it should be written?

<CODE - QUERIES THE DATABASE>
<% set Get_Contact_Info = Server.CreateObject("ADODB.Recordset")
query = "SELECT EMailAddress FROM dbo.Employees WHERE UserID = " & (Get_Postings.Fields.Item("ContactID").Value)
Get_Contact_Info.ActiveConnection = "dsn=;uid=;pwd=;"
Get_Contact_Info.Source = query
Get_Contact_Info.CursorType = 0
Get_Contact_Info.CursorLocation = 2
Get_Contact_Info.LockType = 3
Get_Contact_Info_Open
Get_Contact_Info_numRows = 0
%>
<END CODE>


<CODE - DISPLAYS EMAIL>
Send E-mail To:</b><%=(Get_Contact_Info.Fields.Item("EMailAddress").Value)%>
<END CODE>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top