Sponsored Content
Top Forums Shell Programming and Scripting Email attachment contents misaligned Post 302904335 by member2014 on Tuesday 3rd of June 2014 03:00:33 PM
Old 06-03-2014
Email attachment contents misaligned

Hi All,

I am using mail -s in my shell script to write contents of logfile as the content of my email, and attaching the error_log.txt along with it.
When the email gets sent out, the contents of the attachment error_log.txt is misaligned.

(cat $logfile ;uuencode $error_log.txt error_log.txt ) | mail -s "Update XXX" email@yahoo.com

I tried mutt and see the same issue. Can someone help me how the attachment can be sent out without the contents being misaligned?

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Email Attachment

Hi, I have 2 questions regarding sending mail as attachment. 1. Using mime type (From Oracle tools which reside on UNIX) When send the mail(txt file) as an attachment, on some servers like Hotmail, the email goes perfect as an attachment. But on some servers like yahoo, get embedded mail which... (2 Replies)
Discussion started by: prasad01
2 Replies

2. UNIX for Dummies Questions & Answers

Email Attachment

Is there a way to send an email attachment? So far no where I've looked has given me any leads. (2 Replies)
Discussion started by: Cyro
2 Replies

3. UNIX for Dummies Questions & Answers

how to deattach attachment of email

how to deattach attachment of email (4 Replies)
Discussion started by: kandati
4 Replies

4. AIX

Email with Attachment

Hi, I have .ksh file which internally calls a .sql file. This sql file writes a file with the result. I am using the following command to send email with the result file as attachment uuencode file.txt file.txt | mail -s "Subject" abc@abc.com. When i run the .ksh file i get a message you... (5 Replies)
Discussion started by: piyushprabhakar
5 Replies

5. Shell Programming and Scripting

sending an attachment through email

As a part of requirement I need to send out mails with attachment from UNIX. I have to take query the Oracle DB and send the result of the query in an attachment through mail. I use the following script for the same. #!/bin/csh #!/bin/bash #!/bin/ksh ATTFILE=/folder1/test.xls cd... (1 Reply)
Discussion started by: Sgiri1
1 Replies

6. Shell Programming and Scripting

Email Attachment Script

Hello, I created the following script but i'm trying to figure out why i keep getting an error. #!/usr/bin/perl -w use strict; use warnings; my $baseDir = '/export/home/omcadmin/bin'; my $attachment = "$baseDir/message.txt"; my $from = 'xxx@xxx.com'; my $to = 'xxx@xxx.com'; my... (10 Replies)
Discussion started by: xmaverick
10 Replies

7. Solaris

Sent an email attachment, but the attachment is empty

I'm trying to send a .zip file from my unix box to my work email (email client outlook) The file name that I'm trying to sent is sites.zip and this is how I do it: uuencode sites.zip | mailx -s "testing" myname@mydomain.com When I open the .zip, the zip is empty. Looking around the we, I... (17 Replies)
Discussion started by: amb1s1
17 Replies

8. Shell Programming and Scripting

GPG email attachment

Hi, Can we send gpg encrypted file as an email attachment using uuencode in linux??if so can you give me the code.. Regards, Sandeep. (1 Reply)
Discussion started by: sandeep karna
1 Replies

9. Shell Programming and Scripting

Not able to send attachment with the email

Hi All, The below code is working fine for me. mailx -s hello abc@xyz.com <<EOT Hello !!! How are you? Regards Rahul EOT But i am not able to send csv file with the mail .Getting just themail but not the attachment. uuencode /path/s1.csv | mailx -s hello abc@xyz.com <<EOT... (9 Replies)
Discussion started by: rafa_fed2
9 Replies

10. Shell Programming and Scripting

Attachment in email

I have a file in unix, while i do email that file to some one from unix, the attachment file data is displaying in the email. (as body of the email). but if the file has some special characters , the file is emailing as attachment. But i need the file as the body in the email if it has special... (1 Reply)
Discussion started by: nani1984
1 Replies
ERROR_LOG(3)								 1							      ERROR_LOG(3)

error_log - Send an error message to the defined error handling routines

SYNOPSIS
bool error_log (string $message, [int $message_type], [string $destination], [string $extra_headers]) DESCRIPTION
Sends an error message to the web server's error log or to a file. PARAMETERS
o $message - The error message that should be logged. o $message_type - Says where the error should go. The possible message types are as follows: error_log(3) log types +--+---------------------------------------------------+ |0 | | | | | | | $message is sent to PHP's system logger, using | | | the Operating System's system logging mechanism | | | or a file, depending on what the error_log con- | | | figuration directive is set to. This is the | | | default option. | | | | |1 | | | | | | | $message is sent by email to the address in the | | | $destination parameter. This is the only message | | | type where the fourth parameter, $extra_headers | | | is used. | | | | |2 | | | | | | | No longer an option. | | | | |3 | | | | | | | $message is appended to the file $destination. A | | | newline is not automatically added to the end of | | | the $message string. | | | | |4 | | | | | | | $message is sent directly to the SAPI logging | | | handler. | | | | +--+---------------------------------------------------+ o $destination - The destination. Its meaning depends on the $message_type parameter as described above. o $extra_headers - The extra headers. It's used when the $message_type parameter is set to 1. This message type uses the same internal function as mail(3) does. RETURN VALUES
Returns TRUE on success or FALSE on failure. NOTES
Warning error_log(3) is not binary safe. $message will be truncated by null character. Tip $message should not contain null character. Note that $message may be sent to file, mail, syslog, etc. Use appropriate conver- sion/escape function, base64_encode(3), rawurlencode(3) or addslashes(3) before calling error_log(3). EXAMPLES
Example #1 error_log(3) examples <?php // Send notification through the server log if we can not // connect to the database. if (!Ora_Logon($username, $password)) { error_log("Oracle database not available!", 0); } // Notify administrator by email if we run out of FOO if (!($foo = allocate_new_foo())) { error_log("Big trouble, we're all out of FOOs!", 1, "operator@example.com"); } // another way to call error_log(): error_log("You messed up!", 3, "/var/tmp/my-errors.log"); ?> CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.2.7 | | | | | | | The possible value of 4 was added to $mes- | | | sage_type. | | | | +--------+---------------------------------------------------+ PHP Documentation Group ERROR_LOG(3)
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy