problem creating a link in an e-mail using cdonts

Results 1 to 3 of 3

Thread: problem creating a link in an e-mail using cdonts

  1. #1
    Join Date
    Dec 1969

    Default problem creating a link in an e-mail using cdonts

    Hi wonder if you can help. I need to write a link in the body of an an e-mail which I have built from asp mail. It nearly works but only half of the link is clickable so some of the querystrings can&#039t be past. Heres my code. <BR><BR>Also when the recepient click this link they need to be taken to the page which is within a frame. Its the main part of the frame. How would you do this? Any help would be most appreciated.<BR><BR>cheers Mark<BR><BR>&#060;%<BR>&#039DECLARE VARIABLES<BR>Dim strname<BR>Dim stremailaddress<BR>Dim strfriendemailaddress<BR>Dim strproductname<BR>Dim strreturnpage<BR>Dim strprodid<BR>Dim strprice<BR>Dim strwhofor<BR><BR>&#039grab data from form and associate with variables<BR>strname = Request.Form("name")<BR>stremailaddress = Request.Form("emailaddress")<BR>strfriendemailaddr ess = Request.Form("friendemailaddress")<BR>strprodname= request.form("prodname")<BR>strprodid=request.form ("prodid")<BR>strreturnpage=request.form("returnpa ge")<BR>strprice=request.form("price")<BR>strwhofo r=request.form("whofor")<BR><BR>&#039testing for blank e-mail address<BR>If stremailaddress="" Then<BR>Response.Redirect "error.asp"<BR><BR>Response.End<BR>End If<BR><BR>Set objCDOMail = Server.CreateObject("CDONTS.NewMail")<BR>objCDOMai l.From = stremailAddress<BR>objCDOMail.To = strfriendemailaddress<BR>&#039the subject of the message<BR>objCDOMail.Subject = "exciting product from swaggers, " & strprodname<BR>&#039 the message including the link<BR>objCDOMail.Body = "I found this on the swaggers web site click this link to view it " & vbCrLf & vbCrLf & "" &"?productid=" & strprodid & "&price=" & price &"&whofor=" & whofor & "&returnpage=" & strreturnpage & vbCrLf <BR>objCDOMail.Send &#039send the message<BR>Set objCDOMail = Nothing &#039then destroy the component<BR>%&#062;<BR>&#060;%Response.Redirect "thankyou2.asp" & "?returnpage=" & strreturnpage & "&price=" & strprice & "&whofor=" & strwhofor & "&prodid=" & strprodid%&#062;<BR>&#060;html&#062;<BR><BR>&#060; head&#062;<BR>&#060;title&#062;&#060;/title&#062;<BR>&#060;/head&#062;<BR><BR>&#060;body&#062;<BR><BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR>

  2. #2
    Mauricio C Guest

    Default RE: problem creating a link in an e-mail using cdo

    *<BR> Make ur E-mail HTML format.<BR><BR> All u have to do is set the mailObject Property, like this:<BR><BR> objCDOMail.BodyFormat = 0 &#039 CdoBodyFormatHTML<BR> objCDOMail.mailFormat = 0 &#039 CdoMailFormatHTML<BR><BR> And.. of course, u have to do it BEFORE objCDOMail.send<BR><BR> C ya. Hope is werks.<BR><BR> BTW, ye&#039ll have to set ur message like this:<BR><BR> Var HTMLBody<BR><BR>HTMLBody = "I found this on the swaggers web site.<BR>"<BR>HTMLBody = HTMLBody & "click &#060;a href="""&strProdID&"&price="&pr ice&"&whofor="&whofor&"&returnpage="&returnpage&"" "&#062;here&#060;/a&#062; to view it"<BR><BR>so.. the thing, is, change " to "" -inside HTML tags- and change *vbCrLf* to *&lt;BR&gt;*<BR><BR>Mauricio C.

  3. #3
    MG Guest

    Default RE: problem creating a link in an e-mail using cdo

    You will need to send the email as html and build the link with anchor tag. If you send in text format, it breaks the line at 64 characters (I think it is 64 but that is close). I don&#039t believe there is a work around sending as text.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts