?
Solved

Jmail 3.7.0 - Html Email - Concatenate hyperlink and sessionid

Posted on 2004-10-12
5
Medium Priority
?
434 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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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/…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

752 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