473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Need help adding a hyperlink mailto: item

I would like to be able to add a hyperlink to the posted form below
that automatically creates a hyperlink of the email address of the
person submitting the form. Can someone please help me with the code I
need to add?
<%@language=vbscript%>
<%option explicit

dim fromMail
fromMail = "in**@emailaddress.com"
dim mailBody
mailBody = "Below is the result of your feedback form. It was
submitted by" & vbcrlf _
& Request.Form("email") & " on " & date() & vbcrlf & vbcrlf _
& "sender name: " & Request.Form("sendername") & vbcrlf & vbcrlf _
& "brides name: " & Request.Form("bridesname") & vbcrlf & vbcrlf _
& "grooms name: " & Request.Form("groomsname") & vbcrlf & vbcrlf _
& "address: " & Request.Form("address") & vbcrlf & vbcrlf _
& "city: " & Request.Form("city") & vbcrlf & vbcrlf _
& "state/province: " & Request.Form("state_province") & vbcrlf &
vbcrlf _
& "zip/postal code: " & Request.Form("zip_postalcode") & vbcrlf &
vbcrlf _
& "country: " & Request.Form("country") & vbcrlf & vbcrlf _
& "phone: " & Request.Form("phone") & vbcrlf & vbcrlf _
& "email: " & Request.Form("email") & vbcrlf & vbcrlf _
& "referred by: " & Request.Form("referredby") & vbcrlf & vbcrlf _
& "contact time: " & Request.Form("contacttime") & vbcrlf & vbcrlf _
& "package type: " & Request.Form("packagetype") & vbcrlf & vbcrlf _
& "party size: " & Request.Form("partysize") & vbcrlf & vbcrlf _
& "date: " & Request.Form("month") & "/" & Request.Form("day") & "/" &
Request.Form("year") & vbcrlf & vbcrlf _
& "time: " & Request.Form("time") & vbcrlf & vbcrlf
if Request.Form("mailbrochure") = "" then
mailBody = mailBody & "would NOT like to receive a brochure by mail" &
vbcrlf & vbcrlf
else
mailBody = mailBody & "would like to receive a brochure by mail" &
vbcrlf & vbcrlf
end if
mailBody = mailBody & "comments: " & Request.Form("specialrequests") &
vbcrlf & vbcrlf

Dim objCDO
Dim objConf
Dim objFields
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set objConf = Server.CreateObject("CDO.Configuration")
Set objFields = objConf.Fields
objFields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= cdoSendUsingPort
objFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "smtp.mailserver.com"
objFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 15
objFields.Update

call
sendmail(fromMail,Request.Form("recipient"),Reques t.Form("subject"),mailBody)

'Cleanup
Set ObjCDO = Nothing
Set objConf = Nothing
Set objFields = Nothing

Response.Redirect Request.Form("redirect")

' ********************************
' functions/subroutines follow
' ********************************

SUB sendmail( fromWho, toWho, Subject, Body )

on error resume next

Set objCDO.Configuration = objConf
objCDO.From = fromWho
objCDO.ReplyTo = Request.Form("email")
objCDO.To = toWho
objCDO.Subject = Subject
objCDO.TextBody = Body
objCDO.Send
on error goto 0

END SUB

%>

Mar 1 '06 #1
3 4599

mc****@gmail.com wrote:
I would like to be able to add a hyperlink to the posted form below
that automatically creates a hyperlink


Hyperlinks can't create hyperlinks. Could you clarify your problem a
bit more please?

--
Mike Brind

Mar 1 '06 #2
When the form is submitted, I would simply like the email to contain a
mailto: hyperlink using the person's email address who submitted the
form. This way the recipient can just click the link to open a new mail
message to that person.

Mar 2 '06 #3

mc****@gmail.com wrote:
When the form is submitted, I would simply like the email to contain a
mailto: hyperlink using the person's email address who submitted the
form. This way the recipient can just click the link to open a new mail
message to that person.


At the moment, your email is being created as plain text. Some email
clients will create a hyperlink for the email address, and some won't.
You could try to force a hyperlink by putting emailto: in front of the
email address, but the only way to guarantee it will appear as a
hyperlink is to use html format for the email body.

--
Mike Brind

Mar 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard | last post by:
I have an on line search which produces a result, two lines of which appear in the results table so: mailto:UserId12345@mysite.com and http://www.mysite.com/image1.gif This looks totally...
4
by: Tero Partanen | last post by:
Hello! I'm writing about a rather peculiar problem I'm having with Access2000. I have a table in which I have created one hyperlink-type field. I have given the field a default value which is...
1
by: Pat | last post by:
All, What I want to do: ******************* Click on a hyperlink in the last column in a datagrid, have it grab a value in the fourth column in the same row and send it to the codehind into a...
2
by: Rod Snyder | last post by:
I have a hyperlink control for which the text property is the xxx@xxx.com address in a db field. I want to display this and set the NavigateURL field of the control to the same field (with a...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
3
by: Raja | last post by:
I have a datagrid, it has dropdown box as a column and i have one more column that has hyperlink. The NavigateURL for the hyperlink is to open a new window with a query stirng parameter as the...
2
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the...
26
by: Simon Jefferies | last post by:
Hello, I am trying to add an item to a checked list box, like: clbList.Items.add("Hello",true) I get an error back: Run-time exception thrown: System.ArgumentOutOfRangeException -...
0
by: jdw | last post by:
I have seen sample code to add mailto feature in datagrid hyperlink field using the RowDataBound event. I did it a bit different. e-amil address are stored in a database. name@domain.com. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.