UNIX mail Format issue : Outlook 2007 and 2013


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting UNIX mail Format issue : Outlook 2007 and 2013
# 1  
Old 04-30-2015
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 ) :
Code:
Server Instance Database Backup Time Status
------------------- --------- --------- -------------- ----------------------
server1...     ins1 DB1 00:23 Completed
Server2 .....ins2 DB2 11:12 Completed
Server3 ...ins3 DB3 19:54 Completed
Server4 ..ins4 DB4 19:55 Completed
Server5 ...ins5 DB5 19:02 Completed

[Here ... means space]

in outlook 2007
Code:
Server Instance Database Backup Time Status
------------------- --------- ----------- --------------- ----------------------
server1 ins1 DB1 00:23 Completed
Server2 ins2 DB2 11:12 Completed
Server3 ins3 DB3 19:54 Completed
Server4 ins4 DB4 19:55 Completed
Server5 ins5 DB5 19:02 Completed

I am using printf command for producing result :
Code:
printf "%-20s%-10s%-10s%-15s%-85s\n" "$SERVER_NAME" "$INSTANCE_NAME" "$i" "$backup_ftime" "$final"

For mail I am using mail command, other commands are not supported.
In Unix box its generating file with correct space.
If you have faced similar issue and you have solution then please let me know.

Last edited by Don Cragun; 04-30-2015 at 07:02 PM.. Reason: Add CODE and ICODE tags.
# 2  
Old 04-30-2015
All versions of outlook are well known for mangling your formatting however they please, not just squeezing spaces but deleting lines and so forth.

If you want it to show as intended, either put it in a .txt file attachment, or wrap it in html PRE tags like
Code:
<html><pre>text
text
text</pre></html>

# 3  
Old 05-01-2015
I have faced a similar solution and found'

1) Ensure the font configured in outlook for plain text email is a non-proportional font.
2) start each line with 1 or more spaces, this seems to avoid the outlook paragraph building "feature" that replaces multiple spaces.
# 4  
Old 05-01-2015
Solutions provided is not working

Solutions provided is not working.. please let me know if you have any other solutions.

---------- Post updated at 12:24 PM ---------- Previous update was at 12:23 PM ----------

In our environment we cant send any file as attachment from Unix box.
Security reason.

Last edited by niteshtheone; 05-01-2015 at 01:39 PM..
# 5  
Old 05-01-2015
Moderator's Comments:
Mod Comment Posting "Does not work" without explanation does not help you or anyone. If a command does not work for you, please show the exact circumstances you used it, and the exact error or malfunction you received. Do not paraphrase errors, or post the text as links, images, or attachments if you can avoid it: Paste the exact message, in code tags, like [code] text [/code] or by selecting the text and using the Image button.

Thank you.

The UNIX and Linux Forums
# 6  
Old 05-03-2015
This seems to view fine in outlook 2010 ( sorry don't have 2013 around to test):

Code:
(  FMT="  %-20s%-10s%-10s%-16s%-15s%-7s\n"
   printf "$FMT" Server Instance Database Backup Time Status
   printf "$FMT" ------------------- --------- --------- -------------- ----------------------
   printf "$FMT" server1 ins1 DB1 00:23 Completed
   printf "$FMT" Server2 ins2 DB2 11:12 Completed
   printf "$FMT" Server3 ins3 DB3 19:54 Completed
   printf "$FMT" Server4 ins4 DB4 19:55 Completed
   printf "$FMT" Server5 ins5 DB5 19:02 Completed ) | mail -s 'Indent test' testuser@your.company.com

Notice the two spaces at the front of $FMT.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 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

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. for i in `cat "${GEN_PARAM_LIST3}"` do ... (0 Replies)
Discussion started by: Ariean
0 Replies

3. Linux

Send mail to outlook

Hello Guys, I have a requirement to send an email to outlook from unix script. I have used the below stuff to send an email and it worked on machine A but not on machine B. Please find their versions. Machine A ) Linux xxx 2.4.9-e.40enterprise #1 SMP Thu Apr 8 16:43:01 EDT 2004 i686 unknown... (1 Reply)
Discussion started by: srikanthbiradar
1 Replies

4. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

5. Shell Programming and Scripting

How i can send a mail from outlook to an UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can sent from the unix server to my outlook account,I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (5 Replies)
Discussion started by: igelegin
5 Replies

6. UNIX Desktop Questions & Answers

Outlook Mail Rule issue- not reaching the unix server

Hi All, I' m having a pretty strange issue, when I sent an outlook email that is forwarded by rule for example (email sent every day at certain time) to the server is not going through, i cant see it arriving at the Maildir or i have also a procmail rule log that also not reaching... could... (0 Replies)
Discussion started by: Skyline88
0 Replies

7. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

8. UNIX for Dummies Questions & Answers

UNIX mail to Outlook 2003

I'm trying to move a users multiple folders (archieved email) from a Solaris UNIX system to Outlook 2003. The user accesses the mail via ELM and folder are kept on his home drive, not under /var/mail. I was told I can use either IMAP and/or POP3 to connect to the UNIX server from outlook and just... (1 Reply)
Discussion started by: rpennell
1 Replies

9. UNIX for Dummies Questions & Answers

Unix IMAP e-mail via Outlook showing +10 hours

Multiple users at my work are connecting to a UNIX IMAP e- mail server via Outlook 2003 that is creating a small problem. Random new e-mails repeat themselves up to 3 times with an additional 10 hours added to them of when the original arrived. i.e Original e-mail marked arrived at 10:00am... (2 Replies)
Discussion started by: arkady
2 Replies
Login or Register to Ask a Question