In the mail, i am getting like:
There's a lot of space between 20 and are. i want it with proper spaces alignment.
Is there any way to specify the 20 in some other font or color?
And also the contents of the attachment is not in proper way.
While viewing the $sfile in unix, the contents are displaying line by line:
But while viewing the mail attachment the contents are coming like:
For problem 1:
That brings just 20 without the space in front of it and removes a useless cat.
For problem 2:
This will change all newlines versus a blank. Maybe you can use this inside your script when assigning it to a variable or whatever.
The solution fo rproblem1 is fine. i need more clarity in solution for problem 2.
while viewing in unix cat $sfile, it's displaying the contents properly.
But while attaching the $sfile using uuencode, the problem occurs.
After recieving the mail if i open the attachment , all the 20 lines got combined in a single line.
I want it in 20 lines even in attachment too.
How to achieve this?
Ah you send it as an attachment ok. I guess that's a problem of the mail client you are viewing the attachment with. It might expect <CR><LF> and since this file is coming from a Unix/Linux box (my assumption) it will only contain <CR>.
You could try to use this on the attachment before you send it:
For problem 1:
That brings just 20 without the space in front of it and removes a useless cat.
For problem 2:
This will change all newlines versus a blank. Maybe you can use this inside your script when assigning it to a variable or whatever.
Hi the soultion fo rproblem 1 is not working exactly . For the code:
Now the attachment comes properly.
But the body text still comes as:
Any idea to avoid that spaces between are and 20. i need only one space.
Thanks
---------- Post updated at 01:37 PM ---------- Previous update was at 01:30 PM ----------
resolves the space issue. thanks
I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening.
# hostname
TechX
I checked the mail log ( /var/log/maillog ) and found the below error.
I'm sharing all the ".cf" files seen in the error log.
1.
# more /etc/postfix/main.cf
# postfix... (0 Replies)
Whats the difference between mail and mailx?
I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL)
... (1 Reply)
Hi
I am using the below command to send mail from unix with body as well as attachment.
But the attachment is in encoded form in the body itself.
I am not receiving as attachment:
(cat body_success.txt;uuencode Log.txt Log.txt)| mailx -s "success" $ToID
I am receiving... (5 Replies)
Hi guys...
I am busy writing a script to notify me via an mail if my application is down. I have done that.
Now I want this script to stop sending mails after five mails were sent but the script should keep on checking the application.
When the application is up again that count should be... (5 Replies)
hi-I want to write a UNIX Script which will fetch records from Oracle database.I want to store these records in a file under fields like email address,name and the transaction_id and then fetch these records from the file and send the email to individual users with their transaction ID details. (4 Replies)
Hi everyone!
I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string.
Is there a way to send this message to a mail client using SMTP?
Even better, is there any place on this site that has these kinds of... (5 Replies)