V_EMAIL_ADDRESS=$5
V_REQUEST_ID=$6
V_EMAIL_SUB=$7
V_COMPLETION_STATUS=$8
V_USER_NAME=$9
V_COMPLETION_TIME=${10}
echo "Email parameter: $5"
echo "Request parameter: $6"
echo "Subject: $7"
echo "Completion Status: $8"
echo "User Name: $9"
echo "Completion Time: ${10}"
#echo "-------------------------------------------------------"
#V_EMAIL_ADDRESS="Emailparameter"
echo "-------------------------------------------------------"
echo "-------------------------------------------------------"
#V_EMAIL_ADDRESS="srinivas.ginyarpalli@oracle.com"
echo "-------------------------------------------------------"
echo "Email Address "$V_EMAIL_ADDRESS
#V_EMAIL_SUB="$V_EMAIL_SUB:$V_REQUEST_ID"
#V_EMAIL_SUB="XXCB Ricoh Request status Report for RIF Request ID: $request_id"
echo "Email Subject:"$V_EMAIL_SUB
echo "Request id:"$V_REQUEST_ID
echo "Completion Status:"$V_COMPLETION_STATUS
echo "User Name:"$V_USER_NAME
echo "Completion Time:"$V_COMPLETION_TIME
#echo "Out file"o$request_id
#/usr/bin/uuencode $APPLCSF/out/$CONTEXT_NAME/o$request_id.out XXCB_ERROR_WARNING_REPORT.out|mailx -s "${V_EMAIL_SUB}" ${V_EMAIL_ADDRESS}
FILE="$APPLCSF/$APPLLOG/l$V_REQUEST_ID.req"
echo $FILE
###############
# Convert line feeds from the source and write to attach.out.
#unix2dos -437 -ascii data.txt attach.out
#unix2dos -437 -ascii $FILE
# Now uuencode attach.out and call it data.txt for the attachment name.
#(print "Please review the attached file";uuencode attach.out data.txt) | mailx -s "Test" myemail@mydomain.com
###############
############################################
if test -r $FILE
then
(echo "Hi,"
echo "Please find the Errored Concurrent Program details below:"
echo ""
echo "---------------------------------------------------------"
echo "Email Subject:"$V_EMAIL_SUB
echo "Request id:"$V_REQUEST_ID
echo "Completion Status:"$V_COMPLETION_STATUS
echo "User Name:"$V_USER_NAME
echo "Completion Time:"$V_COMPLETION_TIME
echo "---------------------------------------------------------"
echo ""
echo "Thanks and Regards,"
echo "System Administrator"
uuencode $FILE $FILE) | mailx -s "$V_EMAIL_SUB" "$V_EMAIL_ADDRESS"
#(echo "Email text" ; uuencode $FILE $FILE) | mailx -s "$V_EMAIL_SUB" $V_EMAIL_ADDRESS
#mailx -s "$SUBJECT" -c $EMAILCC $EADDRESS
#uuencode $FILE email_$V_REQUEST_ID.txt > eout_$V_REQUEST_ID.txt
#cat $XBOL_TOP/bin/message.txt FILE > Consign_$V_REQUEST_ID.txt
#cat $FILE > Consign_$V_REQUEST_ID.txt
echo " ---- Send Email to --> "$V_EMAIL_ADDRESS
#mailx -s "$V_EMAIL_SUB" $V_EMAIL_ADDRESS < Consign_$V_REQUEST_ID.txt
#reerecho " ---- Removing the runtime files ----"
#rm eout_$V_REQUEST_ID.txt
#rm Consign_$V_REQUEST_ID.txt
echo " ------------------------------------"
fi
############################################
#cat $FILE | mailx -s "${V_EMAIL_SUB}" ${V_EMAIL_ADDRESS}
if [[ $? -ne 0 ]]; then
echo "Error: Unable to email $FILE to $V_EMAIL_ADDRESS"
else
echo "Success: Sent $FILE to $V_EMAIL_ADDRESS"
fi
The issue is that the attachment is fine if we open thru our inbox. If we open the same thru web mail, then the junk chars its showing.
Regards,
Srinivas
Last edited by Franklin52; 02-29-2012 at 03:14 AM..
Reason: Please use code tags for code and data samples, thank you
Dear Friends,
Is there any way to block incoming emails with attachments or move them in specified directory on.
Can anybody help?
Yours
kam (10 Replies)
I use metasend to send an attachment to an email. The attached file has a .csv extension however when the email is received the extension is changed to .att. Does anyone know why ? I need the name to remain as .csv (1 Reply)
Another question if you guys don't mind, if you do this:
cat * |mailx -s xxxxx <email>
it will send files to a email address displayed as sdout, is there a quick way to send files to a e-mail address but as a attachement? Say if I renamed files to .xls on unix, and sent them to a e-mail... (4 Replies)
I want to send a mail with three attachments, but nothing happened. I tried it with mail and mailx.
Are there special options for these commands or is it not possible to send mails under Solaris with attachments? Must there be special adjustments in the environment?
Can anyone give an... (6 Replies)
Hi,
I am executing the following command in order to send a file as an attachment:
mailx -s "Subject" emailID@xyz.com < Testfile.txt
Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an... (7 Replies)
:wall:hi all,
please somebody can help me out in reading the pop3 mail attachments or saving it locally
i have a mail account where i receive .csv attachments i need to read that attachments and process them.
any sample code can be much appriciated
Removed email
:wall: (3 Replies)
Can someone help me to understand how to configure java mail on unix or what is syntex for that to put in script so email can be sent.
earlier i was using 'send mail' to send email and not SMPT is stopped in unix machine and they asked us to use java mail.
Before I was using this ... (0 Replies)