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_Inf
pen
Get_Contact_Info_numRows = 0
%>
<END CODE>
<CODE - DISPLAYS EMAIL>
Send E-mail To:</b><%=(Get_Contact_Info.Fields.Item("EMailAddress").Value)%>
<END CODE>
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_Inf
Get_Contact_Info_numRows = 0
%>
<END CODE>
<CODE - DISPLAYS EMAIL>
Send E-mail To:</b><%=(Get_Contact_Info.Fields.Item("EMailAddress").Value)%>
<END CODE>