Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL Link cut off in EMAIL

Status
Not open for further replies.
Nov 29, 2001
72
US
I have a peculiar problem. When a new help desk ticket is assigned using my Intranet, it updates the database and sends out an EMAIL to the Help Desk and/or the person assigned to the task with a URL to view the actual ticket. It's rather simple:
*************************************
EMAIL = trim(rst("EMAIL"))
set objMail = CreateObject("CDONTS.Newmail")
objMail.From = "HelpDesk@TheCareGroup.com"
objMail.To = EMAIL
objMail.Subject = "Help Desk Ticket Assigned"
objMail.Body = "You have been assigned ticket number " & nTicketNo & " " _
& " _
& "ReqEditView.asp?parm1=" & nTicketNo
objMail.Send
set objMail = Nothing
***************************************
This worked just fine until we got to ticket #1000. Then the URL in the EMAIL sent was dropping the last digit of the ticket number off the URL link.

*********************************************
You have been assigned ticket number 1006
6
*********************************************
As you can see it is dropping the "6" from the 1006 onto the next line and separating it from the URL link completely. As a result, clicking on this URL will display ticket# 100 every time.

No matter how I truncate the message, this problem continues. Is there some sort of limit I am not aware of?

Thanks in advance for your help,
Dave
 
one thing I would do is
cDbl(nTicketNo)

te main thing is to use variables to hold your values always when they pass certain lengths (I'm a hater of the line continuation key _
eg:
str = "You have been assigned ticket number " & cDbl(nTicketNo)
str = str & " str = str & "ReqEditView.asp?parm1=" & cDbl(nTicketNo)

objMail.Body = str

_____________________________________________________________________
[sub]Where have all my friends gone to????[/sub]
onpnt2.gif

 
Just a thought.

I think that you use OutLook or some email client to read the email. Maybe that email client automatically break the line and go to the next line if that line is long (I think usually they set 78 chars/line).

In this case, the link is not long but Len(the text and the link) is long. So, I think you should break it instead of letting the email client breaks it.

objMail.Body = "You have been assigned ticket number " & nTicketNo & vbCrLf & " " _
& " _
& "ReqEditView.asp?parm1=" & nTicketNo
objMail.Send
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top