How to send a mail with a URL with swaks

emailgmailmailboxsendmail

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.

Best Answer

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
Related Topic