|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Need help adding a hyperlink mailto: item
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 = "i***@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"),Request.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 %> mcs***@gmail.com wrote:
> I would like to be able to add a hyperlink to the posted form below Hyperlinks can't create hyperlinks. Could you clarify your problem a> that automatically creates a hyperlink bit more please? -- Mike Brind 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. mcs***@gmail.com wrote:
> When the form is submitted, I would simply like the email to contain a At the moment, your email is being created as plain text. Some email> 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. 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 |
|||||||||||||||||||||||