Solved

Jmail 3.7.0 - Html Email - Concatenate hyperlink and sessionid

Posted on 2004-10-12
5
425 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
  • 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now