Send an email with out attachment from shell script


Requirement is to send an email with out attachment using shell script.

Sample Shell Script:

#!/bin/ksh

#*******************************************************************************

# Name : HH_TEST_SHELL

# Date : 19-MAY-2023

# By : AskHareesh

# Description : Execute JAR File

#*******************************************************************************

MAILBODY="Hi Team,

Please find the attached report."

MAIL_SUBJECT="Sales Order Status Report"

VALIDATEEMAILS="askhareesh@gmail.com"

LOGDIR="/test/dir/"

LOGFILE="SalesOrderReport.csv"

INSTANCENAME="DEV"

(echo  "$MAILBODY") | mailx -s "$INSTANCENAME : $MAIL_SUBJECT" $VALIDATEEMAILS

*/

No comments:

Post a Comment