Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JLK
Starting Member
5 Posts |
Posted - 2007-11-28 : 16:06:55
|
I'm generating emails using sp_send_dbmail. Everything works perfectly except for one thing. In the body of the email I need to show a link to a web page (eg http://myweb/login.aspx).The problem is that the received email shows the "link" as plain text, ie it is not a clickable link. I've tried adding char(13) (and char(10) and both) after the link text but that doesn't help.Is there a way to make the link text a real link when received by Outlook? (All recipients will be using Outlook if that helps).Thanks,John |
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 2007-11-28 : 16:11:31
|
are you using @body_format = 'HTML'? |
|
|
JLK
Starting Member
5 Posts |
Posted - 2007-11-28 : 16:16:19
|
Yes I am. The code for the email itself is:OPEN _EmailCursorFETCH NEXT FROM _EmailCursor INTO @JPOEmailAddressWHILE @@FETCH_STATUS = 0 BEGIN --Send Email SET @EmailBody = 'There was placement activity regarding youth in your caseload. Please click the following link, log in to JJIS Intake Web and review the Placement Activity Report.' + CHAR(10) + CHAR(13) + CHAR(10) + CHAR(13) + 'jjisweb1/dotnetsystems/JJISBusinessProcess/Login.aspx' + CHAR(10) + CHAR(13) EXEC msdb.dbo.sp_send_dbmail @profile_name='JPO_Notification', @recipients = 'john.kilgo@djj.state.fl.us', --@JPOEmailAddess, @Subject = 'Placement Activity Notification', @Body = @EmailBody, @Body_Format = 'HTML' ; FETCH NEXT FROM _EmailCursor INTO @JPOEmailAddress ENDCLOSE _EmailCursorDEALLOCATE _EmailCursor |
|
|
JLK
Starting Member
5 Posts |
Posted - 2007-11-28 : 16:26:53
|
Forgot to say that all the char(10)s and 13s are just stuff I've been trying in order to fix the problem. |
|
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 2007-11-28 : 16:59:44
|
try this...SET @EmailBody = 'There was placement activity regarding youth in your caseload. Please click the following link, log in to JJIS Intake Web and review the Placement Activity Report.' + CHAR(10) + CHAR(13) + CHAR(10) + CHAR(13) +'<a href="./jjisweb1/dotnetsystems/JJISBusinessProcess/Login.aspx"> Login </A>' + CHAR(10) + CHAR(13) |
|
|
JLK
Starting Member
5 Posts |
Posted - 2007-11-29 : 13:41:34
|
The "Login" appears as a link as desired but it does not work. A click on the link doesn't take you anywhere. If I hover over the link the status bar reads "outbind://" plus about a 60 character GUID looking string. Pressing CTRL when clicking on the link does change the behaviour either. As an aside I don't understand the "./jjisweb1". Is "." an escape character for a "/"? |
|
|
JLK
Starting Member
5 Posts |
Posted - 2007-11-29 : 16:09:40
|
Issue resolved. |
|
|
|
|
|