How to send a html email with the bash command “sendmail”?

后端 未结 8 2278
旧巷少年郎
旧巷少年郎 2020-12-13 09:50

Anyone has a demo available?

Sendmail is said to be not scalable,but it\'s free,so I decided to use it first for now:)

8条回答
  •  星月不相逢
    2020-12-13 10:26

    I understand you asked for sendmail but why not use the default mail? It can easily send html emails.

    Works on: RHEL 5.10/6.x & CentOS 5.8

    Example:

    cat ~/campaigns/release-status.html | mail -s "$(echo -e "Release Status [Green]\nContent-Type: text/html")" to.address@company.com -v
    

    CodeShare: http://www.codeshare.io/8udx5

提交回复
热议问题