Hyperlink in email message

Posted on 2006-04-20
Last Modified: 2008-01-09
I would like to set up my email that sent from xp_sendmail to include a hyperlink, so when people receive the email, they can click the link and it open a web page. here is what I set up, but in the email, there is no hyperlink show up, the '<a href="http://ateca4epgnt001/SuspenseTracking/ViewOpenSuspenses.aspx">View Open Suspenses</a>' show up instead. Please help. THanks

SELECT @Suspense = @Suspense + 'Internal Suspense Date: ' + Internal_Suspense_Dt + CHAR(13)  
                  + 'External Suspense Date: ' + Suspense_Dt + CHAR(13)
                  + 'Title: ' + Title + CHAR(13) + 'Comments: ' + Comments + CHAR(13) + 'Assignee: ' + Assigned_To + CHAR(13)
                  + 'Response POC: ' + Response_POC + CHAR(13) + 'Responsible party: ' + Responsible_Party + CHAR(13)
                  +'<a href="http://ateca4epgnt001/SuspenseTracking/ViewOpenSuspenses.aspx">View Open Suspenses</a>'
Question by:CochiseCounty
    LVL 4

    Expert Comment

    Try the below -- although by default xp_sendmail doesn't support HTML emails.. == See Q10

    EXEC master.dbo.xp_smtp_sendmail
        @server = '',
        @from = '',
        @to = '',
        @subject = 'HTML Testing...',
        @type = 'text/html',
        @body = @Suspense

    Author Comment

    How  should I set up to use master.dbo.xp_smtp_sendmail ? I don't see xp_smtp_sendmail in master database
    LVL 75

    Accepted Solution

    See here:

    XPSMTP.DLL - SQL Server SMTP Mail XP

    Author Comment

    I follow the instruction and when I try to execute a sp to send email. I receive this error message
    Cannot load the DLL xpsmtp80.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).

    I checked in my Binn folder, the file xpsmtp80.dll is there.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now