有没有办法在linux中发送电子邮件正文中的html邮件和作为附件的csv文件

有没有办法在linux中发送电子邮件正文中的html邮件和作为附件的csv文件

请看我下面的代码片段,它忽略附件,只显示电子邮件正文中的 HTML 内容。我想附上 CSV 文件。提前致谢!!

awk -F ','  '
        BEGIN {

                print "From: [email protected]"
                print "To: [email protected]"
                print "MIME-Version: 1.0"
                print "Content-Type: text/html"
                print "Subject: Weekly DM Row Count Sheet and Unmatched Data"
                print "<html><body><font face=verdana size=2 color=black ></br></br>Hi Team, </br>Please find the Weekly DM Row Count Sheet and Unmatched Data details. </br></br> <B> Row count is not matching for below tables. Please look into it.</b></br></br> "
                print "<table border=1 cellspacing=1 cellpadding=1 height="75">"
        }
        !/^#/ && /^S/ {
                print "<tr>"
                for ( i = 1; i <= NF; i++ )
                        print "<td> <center> <font face=verdana size=2> " $i " </center></td>"
                print "</tr>"
        }
        !/^#/ && !/^S/ {
                print "<tr>"
                for ( i = 1; i <= NF; i++ )
                        print "<td> <center> <font face=verdana size=2> " $i " </center></td>"
                print "</tr>"
        }
        END {
print "</table>" print "</br></br></b> Thanks & Regards</br> MS Support Team</br>"
print "</body></html>"
} ' NO_MATCH.csv | /usr/sbin/sendmail -t uuencode /root/ms_dba_admin/Scripts/PROMPT_AUDIT_ORDER/temp.csv

相关内容