첨부 파일을 무시하고 이메일 본문에 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