Solved

Jmail 3.7.0 - Html Email - Concatenate hyperlink and sessionid

Posted on 2004-10-12
5
432 Views
Last Modified: 2012-06-27
Hello,
I am working on a project and i am stucked and need help. My requirement is as under :

Visitors fill a form on my web and get registered. When they register i collect sessionid and store it in a database. Then on submission of form, I want to send confirmation email with hyperlink and session id [for eg. www.myweb.com?acti=11111] . When the visitor click the link in his mail box, I collect the activiation code with "Querystring" object and match it.

My problem is : I am unable concate hyperlink and sessionid in confirmation email. Simple hyperlink work [example 1 given below] but in other code [example 2 - i receive error message - unterminated string ] .

My server has Jmail 3.7.0

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
set rs = Server.CreateObject("adodb.recordset")

rs.Open "master",oConn,adOpenDynamic,adLockOptimistic

dim sender, subject, body, smtpServer, smtpPort, s1, s2, receiver, mail

[Example 1 - This code works perfectly ]
Set smail = Server.CreateObject ("JMail.SMTPMail")
smail.AddRecipient rs.Fields("emailid").Value
smail.Sender = "me@myweb.com"
smail.Subject = "Activiation"
smail.ContentType = "text/html"
smail.Body = smail.Body = "Hello this is mer. Check my web at <a href= ""http://www.myweb.com"">www.a.com</a>"  
smail.Priority = 3
smail.Execute  
set smail = nothing


[Example 2 - This code works gives error - unterminated string]
[ Only problem is in body portion of email ]

Set smail = Server.CreateObject ("JMail.SMTPMail")
smail.AddRecipient rs.Fields("emailid").Value
smail.Sender = "me@myweb.com"
smail.Subject = "Activiation"
smail.ContentType = "text/html"

smail.Body = smail.Body = "Hello this is mer. Check my web at <a href= ""http://www.myweb.com & %><% session.sessionid %><% & "">www.a.com</a>"  


smail.Priority = 3
smail.Execute  
set smail = nothing


Please help me. Incase of any doubt about my question please ask me

awaiting reply
0
Comment
Question by:mojick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
MrClean21 earned 125 total points
ID: 12287455
Hi mojick,

 Try this :

smail.Body = smail.Body = "Hello this is mer. Check my web at <a href= ""http://www.myweb.com" & session.sessionid  & """>www.a.com</a>"  

MrClean
0
 

Author Comment

by:mojick
ID: 12287640
Hi MrClean

Thank you very much. It worked perfectly well. Full points to you.

thanks once again
0
 
LVL 4

Expert Comment

by:MrClean21
ID: 12287663
It's always a pleasure...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question