Outlook Email Body Format Issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Outlook Email Body Format Issue
# 1  
Old 06-07-2013
Outlook Email Body Format Issue

Hello All,
I been trying to get a solution for a while not able to figure out. I am generating a file and sending that as an body of message to my outlook account. For some reason reason everything is showing up as one line in the email.

Code:
for i in `cat "${GEN_PARAM_LIST3}"`
do
        UNINUM=`echo $i | awk -F"|" '{print $1}'`
        PROVIDER=`echo $i | awk -F"|" '{print $2}'`
        EXTRACT_DT=`echo $i | awk -F"|" '{print $3}'`
        PROCESS_STATUS=`echo $i | awk -F"|" '{print $4}'`

        echo "Provider:"$PROVIDER", Uninum:"$UNINUM", Extract Date:"$EXTRACT_DT", Loading Status:"$PROCESS_STATUS"" \
        >> "${LOG_DIR}"/StageLoadEmailBody
        echo -e "\r">> "${LOG_DIR}"/StageLoadEmailBody
done
(cat "${LOG_DIR}/StageLoadEmailBody") | /bin/mailx -s "Provider File Loaded Successfully" "${EMAIL_LIST}"

Expected output:
Code:
Informatica Was Able To Successfully Load the Provider File
Provider:16, Uninum:710119, Extract Date:2012-09-30, Loading Status:COMPLETED
Provider:16, Uninum:610000, Extract Date:2012-09-30, Loading Status:COMPLETED
Provider:16, Uninum:710056, Extract Date:2012-09-30, Loading Status:COMPLETED

---------- Post updated at 02:26 PM ---------- Previous update was at 02:00 PM ----------

https://www.unix.com/unix-dummies-que...#post302818425
Quote:
Originally Posted by Ariean
Hello All,
I been trying to get a solution for a while not able to figure out. I am generating a file and sending that as an body of message to my outlook account. For some reason reason everything is showing up as one line in the email.

Code:
for i in `cat "${GEN_PARAM_LIST3}"`
do
        UNINUM=`echo $i | awk -F"|" '{print $1}'`
        PROVIDER=`echo $i | awk -F"|" '{print $2}'`
        EXTRACT_DT=`echo $i | awk -F"|" '{print $3}'`
        PROCESS_STATUS=`echo $i | awk -F"|" '{print $4}'`

        echo "Provider:"$PROVIDER", Uninum:"$UNINUM", Extract Date:"$EXTRACT_DT", Loading Status:"$PROCESS_STATUS"" \
        >> "${LOG_DIR}"/StageLoadEmailBody
        echo -e "\r">> "${LOG_DIR}"/StageLoadEmailBody
done
(cat "${LOG_DIR}/StageLoadEmailBody") | /bin/mailx -s "Provider File Loaded Successfully" "${EMAIL_LIST}"

Expected output:
Code:
Informatica Was Able To Successfully Load the Provider File
Provider:16, Uninum:710119, Extract Date:2012-09-30, Loading Status:COMPLETED
Provider:16, Uninum:610000, Extract Date:2012-09-30, Loading Status:COMPLETED
Provider:16, Uninum:710056, Extract Date:2012-09-30, Loading Status:COMPLETED

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX script email to outlook report format

I have a ksh script that emails a report to outlook from a Unix Solaris. On server the report formatted perfectly. However, the email version the format is not. On the server report looks like this: TN Region Old SPiAD Server Order/Req Local Status NAAC Status Request Date New... (1 Reply)
Discussion started by: mrn6430
1 Replies

2. Shell Programming and Scripting

Required to get out put of log in tabular format in email body

Dears Please support I have out put in text file and look like below fixed inquiries - Click on MAX suffix http://server:port/app User Details http://server:port/app Audit User Detail Action hhttp://server:port/app fixed inquiries - Click on MAX suffix http://server:port/app User Details ... (13 Replies)
Discussion started by: mirwasim
13 Replies

3. Shell Programming and Scripting

UNIX mail Format issue : Outlook 2007 and 2013

Hi, I prepare one backup report which drop mail with backup report. Same report looks different in outlook 2013. e.g : In outlook 2013 ( its a dummy example only ) : Server Instance Database Backup Time Status ------------------- --------- --------- -------------- ----------------------... (5 Replies)
Discussion started by: niteshtheone
5 Replies

4. Shell Programming and Scripting

Body content is in random format while sending email from Linux to my outlook.

Hi I have a script running in lunix machine which emails log file content to my outlook. Here is the actual log file result: Image-1 In-Master:25028 ReplicaDn Consumer Supplier Delay dc=xxx,dc=com lmjker0110:12345 ... (4 Replies)
Discussion started by: buzzme
4 Replies

5. UNIX and Linux Applications

Send email from outlook to server

Hi, I am sending an email from Microsoft Outlook 2010 (microsoft exchange) to a unix server. I am not receiving the email in server but I am getting the following error in outlook. Your message: From: x@y.com Subject: Could not be delivered because the domain name was... (4 Replies)
Discussion started by: Neethu
4 Replies

6. Shell Programming and Scripting

issue with Email Body

Hi, I have written shell program to send email as below - #!/bin/ksh filename=`ls -ltrh *.Z` echo $filename |mailx -s "FOR TESTING" rahul.b@infotech.net I am getting the email but email body is - -rw-rw-r-- 1 bahulra dba 173M Mar 22 04:37 corphist.txt.Z -rw-rw-r-- 1 bahulra dba 107M... (3 Replies)
Discussion started by: rahulbahulekar
3 Replies

7. Shell Programming and Scripting

Crontab issue: getting email but with out body

I have a oracle sh script test.sh #!/bin/bash R=`sqlplus -S *****/*********@dfsdf <<ENDOFSQL set serveroutput on size unlimited; execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS"','F'); execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS_PART"','F');... (1 Reply)
Discussion started by: ramkia6
1 Replies

8. Shell Programming and Scripting

mailx output format in outlook

We have a deamon monitoring script on Solaris 10 - uname -a gives: SunOS be2900 5.10 Generic_118833-33 sun4u sparc SUNW,Netra-T12 Thes script is: #!/usr/bin/ksh if then # Create message body echo "To:a.nother@company.co.uk\n" > /tmp/appmon.$$ echo "Subject: The APP... (1 Reply)
Discussion started by: jabberwocky
1 Replies

9. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

10. UNIX for Dummies Questions & Answers

email file to Outlook using fixed font

I have a unix script that emails output from a sql script. Problem is that the email, once received in Outlook, is in a variable width font which misaligns the columns (I assume it picks up the users default font). Is there any way to send the desired fixed-width font to Outlook via mailx or elm?... (1 Reply)
Discussion started by: tonimac_az
1 Replies
Login or Register to Ask a Question