Sponsored Content
Full Discussion: Strange Issue with sendmail
Top Forums Shell Programming and Scripting Strange Issue with sendmail Post 302980554 by mohtashims on Tuesday 30th of August 2016 06:22:52 AM
Old 08-30-2016
CPU & Memory Strange Issue with sendmail

more works.sh
Code:
#!/bin/ksh

{
        print "From: reportgenerator@myserver.com"
        print "To: randomguy@myfirm.com"
        print "MIME-Version: 1.0"
        print "Content-Type: text/html"
        print "Subject: Disk Report"
        print "<body>"
        print "<table border=1>"
        print "<tr>"
        print "<th bgcolor=#D7D3D3>Disk</th>"
        print "<th bgcolor=#D7D3D3>Growth</th>"
        print "</tr>"
        print "</table>"
        print "<p>Today's by: 999,999</p>"
        print "</body>"
        print "</html>"
} | /usr/sbin/sendmail -t

I run works.sh and i see the table in my email body as expected.

but more fails.sh
Code:
#!/bin/ksh

{
        print "From: reportgenerator@myserver.com"
        print "To: randomguy@myfirm.com"
        print "MIME-Version: 1.0"
        print "Content-Type: text/html"
        print "Subject: Disk Report"
        print "<body>"
        print "<table border=1>"
        print "<tr>"
        print "<th bgcolor=#D3D3D3>Disk</th>"
        print "<th bgcolor=#D3D3D3>Growth Monthly</th>"
        print "</tr>"
        print "</table>"
        print "</body>"
        print "</html>"
} | /usr/sbin/sendmail -t

Does not work as expected. I get email but the HTML Table does not show up ONLY text shows.

The only difference i see if it works when this line is added to the script

print "<p>Today's report shows progress by: 999,999</p>" and fails when removed.

Can you please try to run both of the scripts and see it for yourself. Also, help explain and fix ?

And if both work for you .. still do let me know so we can debug accordingly.

Last edited by mohtashims; 08-30-2016 at 07:21 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Strange Number comparison issue

Hi, I am comparing two numbers, but it gives strange results: My Code: if then echo "True" else echo "False" fi This code gives False for the follwoing comparison where as True for the following: Any reason for this? Both Should have given False... I am using... (9 Replies)
Discussion started by: shihabvk
9 Replies

2. Cybersecurity

root Password ... strange issue

hi there , :cool: um facing a problem with my root passwd i want to set my root password and when i do i get the following :: # # passwd passwd: Changing password for root New Password: Re-enter new Password: passwd(SYSTEM): They don't match. Please try again New Password:... (6 Replies)
Discussion started by: badrali
6 Replies

3. UNIX for Dummies Questions & Answers

Strange issue

I have created a server monitor program in Java that connects to servers via SSH and constantly refreshes the new server load every 3 mins. The problem is that even though it is a Java app running shell commands to get the load info, the commands still appear in 'history'. The question is.. is... (1 Reply)
Discussion started by: AndrewSH
1 Replies

4. UNIX for Advanced & Expert Users

strange aunthentication issue with email

hi again i'm running a centos 4.x box with sendmail and openwebmail. I had a weird situation where users couldn't not get authenticated using a pop mail client but but were able to aunthenticate using the openwebmail webmail client. I looked through the logs and didn't see anything strange. I... (0 Replies)
Discussion started by: mcraul
0 Replies

5. Solaris

strange issue with ALOM in t51...

Hi , running solaris 10 on t5120 and i see ILOM and ALOM (SC) interfaces working fine earlier and suddenly they are responding strangely, First thing , I can connect fine to ILOM or ALOM but then console -f just hangs.. resetsc error : I do not really want to poweroff and poweron... (13 Replies)
Discussion started by: upengan78
13 Replies

6. Web Development

Strange Mysql issue

Hi all, I recently changed the name of my hostname from 'abc123' to 'abc456' (as an example). I then added a user in my mysql database with the new host and removed references to the old users and hostname. The strange thing is though, a process using the database still uses the old... (1 Reply)
Discussion started by: muay_tb
1 Replies

7. AIX

strange route issue in powerha 5.4?

hi all we upgraded hacmp(powerha) from 5.2 to 5.4 recently . during the failover testing, we found a strange network issue. after standby node took service ip address (172.15.100.8) online at standby NIC, we were able to log in the standby node by telnet 172.15.100.8 which stays at... (1 Reply)
Discussion started by: rs6000er
1 Replies

8. UNIX for Dummies Questions & Answers

Strange Keyboard and Mouse Issue

Hello All, PC: CuBox-i (*i.MX6) Mini-PC OS: openSUSE 13.1 (Bottle) (armv7hl) Kernel: 3.14.14-cubox-i # uname -a Linux CuBox-HQ 3.14.14-cubox-i #1 SMP Sat Sep 13 03:48:24 UTC 2014 armv7l armv7l armv7l GNU/LinuxSo I've been having this random issue happen on this PC where a few strange... (12 Replies)
Discussion started by: mrm5102
12 Replies

9. Shell Programming and Scripting

Strange permission issue on Linux server.

Starting sendmail throws this error: I decided to see the permission on the files under /etc/mail and this is the output: # ls -ltr total 284 -rwxr-xr-x. 1 root root 1847 Jan 27 2014 virtusertable -rwxr-xr-x. 1 root root 127 Jan 27 2014 trusted-users -rwxr-xr-x. 1 root root 92... (3 Replies)
Discussion started by: mohtashims
3 Replies

10. AIX

Strange issue installing Java 8

I just intalled java8_64.jre and .sdk respectively installp -agXYd . Java8_64.jre Java8_64.sdk 2>&1 | tee installp.log Worked like a champ. Now I see this-- jeff@server:/usr> ls -l | grep java drwxr-xr-x 9 bin bin 512 Sep 22 2010 java14 drwxr-xr-x 7 bin bin ... (9 Replies)
Discussion started by: jeffs42885
9 Replies
print(1)							   User Commands							  print(1)

NAME
print - shell built-in function to output characters to the screen or window SYNOPSIS
ksh print [ -Rnprsu [n]] [arg...] DESCRIPTION
ksh The shell output mechanism. With no flags or with flag - or -, the arguments are printed on standard output as described by echo(1). OPTIONS
The following options are supported: -n suppresses new-line from being added to the output. -R -r (raw mode) ignore the escape conventions of echo. The -R option will print all subsequent arguments and options other than -n. -p causes the arguments to be written onto the pipe of the process spawned with |& instead of standard output. -s causes the arguments to be written onto the history file instead of standard output. -u [ n ] flag can be used to specify a one digit file descriptor unit number n on which the output will be placed. The default is 1. EXIT STATUS
The following exit values are returned: 0 Successful operation. >0 Output file is not open for writing. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
echo(1), ksh(1), attributes(5) SunOS 5.10 15 Apr 1994 print(1)
All times are GMT -4. The time now is 08:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy