4

I want to send an email message containing a URL.

My first try:

SendMail[email, 
  {subject, "This is my <a href=\"http://www.wolfram.com\">url</a>."}]

My second try:

SendMail[email, 
  {subject, 
    Row[{"This is my ", Hyperlink["url", "http://www.wolfram.com"], "."}]}]

Both failed. When I am sending such messages, the message body will be attached files. Is there a work-around that can implement it? I want the message to include the hyperlink.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
yode
  • 26,686
  • 4
  • 62
  • 167
  • 1
    Perhaps related: Send HTML tables with SendMail. In particular, the comment about SendMail always adding a text/plain section at the beginning of the mail which, I wonder, might be a problem if you try to include an HTML body. – MarcoB Jun 12 '17 at 16:19
  • @MarcoB I'm sorry,hard to understand for me.I don't know how to add that text/plain.Could you help to post it as an complete answer? – yode Jun 12 '17 at 17:31

1 Answers1

1

This works for me:

SendMail[<|
  "To" -> "xyz@somewhere.com",
  "Subject" -> "Test",
  "Body" -> "Here is a link: http://www.wolfram.com.">
]

When I send these to myself I get an email with a working link. (I am using mail.app on a mac.)

Themis
  • 778
  • 4
  • 10