誰でもデモを利用できますか?
Sendmail はスケーラブルではないと言われていますが、無料なので、とりあえず使ってみることにしました :)
私があなたを正しく理解しているなら、あなたはlinuxsendmailコマンドを使ってHTML形式でメールを送りたいと思うでしょう。このコードはUnixで動作しています。ぜひお試しください。
echo "From: me@xyz.com
To: them@xyz.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary='PAA08673.1018277622/server.xyz.com'
Subject: Test HTML e-mail.
This is a MIME-encapsulated message
--PAA08673.1018277622/server.xyz.com
Content-Type: text/html
<html>
<head>
<title>HTML E-mail</title>
</head>
<body>
<a href='http://www.google.com'>Click Here</a>
</body>
</html>
--PAA08673.1018277622/server.xyz.com
" | sendmail -t
sendmailの構成の詳細については、このリンクを参照してください。お役に立てれば。
あなたが sendmail を要求したことは理解していますが、デフォルトのメールを使用しないのはなぜですか? 簡単にHTMLメールを送信できます。
動作: RHEL 5.10/6.x & CentOS 5.8
例:
cat ~/campaigns/release-status.html | mail -s "$(echo -e "Release Status [Green]\nContent-Type: text/html")" to.address@company.com -v
コードシェア: http://www.codeshare.io/8udx5
このページが役に立ちます - http://www.zedwood.com/article/103/bash-send-mail-with-an-attachment
これには、MIME 添付ファイル、つまり HTML ページと画像を含む電子メールを送信するためのスクリプトが含まれています。
-a オプションを使用する方が簡単です:
cat ~/campaigns/release-status.html | mail -s "Release Status [Green]" -a "Content-Type: text/html" to.address@company.com