1

How to send mails with URL with swaks. For instance, how would you to send the following mail?

link

I tried without sucess

swaks -t recipient@mail.com \
--body link<https://en.wikipedia.org/wiki/Main_Page>

Since it is what appear if we display the message as a raw message.

user123456
  • 563
  • 1
  • 7
  • 20
  • You need to do more than that to send HTML email. http://www.jetmore.org/john/code/swaks/faq.html#send_html_email – ceejayoz Apr 24 '17 at 15:45

1 Answers1

6

The email without the mime headers would come across as plain text. The mime headers make the message body gets seen as HTML.

swaks --body '<a href="https://en.wikipedia.org/wiki/Main_Page">link</a>' - --add-header "MIME-Version: 1.0" --add-header "Content-Type: text/html" -t recipient@mail.com
chicks
  • 3,793
  • 10
  • 27
  • 36
user123456
  • 563
  • 1
  • 7
  • 20