Solved

Jmail 3.7.0 - Html Email - Concatenate hyperlink and sessionid

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

829 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