Adding hyperlink within message content of new email using AppleScript

I’ve been searching the internet but am having trouble finding a way to attach a hyperlink to a new email using applescript.

The most helpful link I’ve found is from 2008, and I believe the poster was eventually able to add a hyperlink, but only within a mail signature.

https://discussions.apple.com/thread/1687240

I am already using another mail signature and I’m wondering if there is some other way to do this since it’s been 10 years since the original post.

This is an example of my code:


property thesender : “Belinda “

tell application “Microsoft Excel” set lasty to first row index of (get end (last cell of column 1 of sheet 1) direction toward the top) end tell

repeat with i from 2 to lasty

tell application "Microsoft Excel"      set pername to value of column 1 of row i of sheet 1 of active workbook as text      set peremail to value of column 2 of row i of sheet 1 of active workbook as text   end tell   tell application "Mail"      set theAttachmentFile to "Macintosh HD:Users:abc:Desktop:Photos:abc.jpg"      set signatory to "CXO"      set newemail to make new outgoing message with properties {content:"Hi" & space & pername & "," & return & return & "I hope all is well.  My name is Belinda with Company X. We recently published a peer-based Technologies Survey that I thought you would find valuable & wanted to share." & return & return & return & return & "Download your copy of the survey here: Technologies Survey Powered by Company X. 

Please reach out with any questions or if you’d like to learn how our AI-based platform is helping your peers optimize spend.

I look forward to connecting.

Thanks, Belinda”, visible:true, subject:”ABC Survey Results for” & space & pername, message signature:signature signatory}

    tell content of newemail         make new attachment with properties {file name:theAttachmentFile as alias} at after sixth paragraph     end tell      set sender of newemail to thesender      tell newemail          make new to recipient at end of to recipients with properties {name:pername, address:peremail}      end tell  end tell 

end repeat


‘I need the hyperlink to sit within the message content where it says “Download your copy of the survey here.”

Any help would be greatly appreciated!