Using Shell and smtp to send content in email body along with attachment -


i trying send email using below shell. however, @ time, command sending content in email body , not attachment. please suggest correct syntax or logic send both email body , attachment in single mail.

smtpserver="0.0.0.0" sender="email_id" subject="subject" msg="message" reportfile="<path>/attachment.csv" classpath="<classpath>/attachment.csv" htmlfile="output.html"  java -cp $classpath:$classpath/ojdbc6.jar classfile > $reportfile  awk -f, 'begin{ fs=","; print "data shown below"   print "<html><body><table>" } {  for(i=1; i<=nf; i++) {  print "<td>" $i "</td>" } print "</tr>" } end{ print "<html><body><table>" } '   $reportfile > $htmlfile  /home/mailsend-smtp $smtpserver -content-type 'text/html' -mime-type  "text/html html" -t $receiver -f $sender -sub "$subject"  -msg-body  $htmlfile -attach $reportfile 

i don't know mailsend-smtp tool can use 1 of several built-in command on linux that

try this


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -