Solved

Jmail 3.7.0 - Html Email - Concatenate hyperlink and sessionid

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating Date 4 37
ASP Classic, check if Querystring is UCase or LCase 10 35
Session on Html 8 54
Converting Stored Procedure to SQL Statement 5 62
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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