Sponsored Content
Full Discussion: mailx questions
Top Forums UNIX for Dummies Questions & Answers mailx questions Post 302314531 by power97 on Friday 8th of May 2009 02:56:10 PM
Old 05-08-2009
mailx questions

Hi,
I have a few quick questions that I'm sure the experts could answer very quickly:

1. If I specify the from address in a variable it doesn't seem to work. Here is what I'm doing:
mailFrom="email@address.com"
mailx -s "SUBJECT" -r "$mailFrom" etc .....

2. I'm including the output from logs in the body of an email and I'm using unix2dos for the txt file. Is there any reason to also use uuencode? I've taken a look at the documentation but I'm not sure I fully understand when it should be used ?

3. How can I include the hostname in the subject of the email ? The following doesn't seem to work:

subject="The hostname is $hostname"
mailx -s "$subject" etc .....


Thanks In Advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help with mailx

How can I send a file of Unix usernames to everyone on the file without making an alias in my .mailrc file? Using a mailx command. Thanks, J.J. (2 Replies)
Discussion started by: JJJ
2 Replies

2. Shell Programming and Scripting

Mailx

I am trying to write a shell script using the mailx command. My problem is that I want to send an email address in the CC: field. What option can I use with mailx to accomplish this. Any help would be very appreciative. (1 Reply)
Discussion started by: skammer
1 Replies

3. UNIX for Dummies Questions & Answers

Help with mailx

I want to send a message with an attachment from Unix using the following command: uuencode $DIRNAME/$FILENAME1 | mailx -s "test subject" xyz@xyz I need to attach the file and I also want a simple message body like "there is an error. Please check it". Do I need to have this message body... (1 Reply)
Discussion started by: ssmith001
1 Replies

4. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

5. UNIX and Linux Applications

MailX

Hi, I am not able to send direct mails from our unix server to our lotus notes id. It was fine until we upgrade our Lotus notes server. What are the changes need to add when we upgrade Lotus notes. Please advice. It run in sh file This is the statement uuencode $RTDIR/$filename... (0 Replies)
Discussion started by: rajani_p
0 Replies

6. UNIX for Advanced & Expert Users

mailx

We are using mailx to send email alerts. On occasions, it is updating our Distribution list with the mesage content. The following is the relevant portion of the script :- MAILGROUP=`more $MDS/feeds/alerts/distribution.lst` export MAILGROUP echo " " | mailx -s "MDS Alert - Refresh Complete"... (6 Replies)
Discussion started by: Paul Byrne
6 Replies

7. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

8. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

9. Linux

Mailx

We have configured mailx Linux server. When send mail from Linux server it is not going How to trouble shoot the root cause step by step (3 Replies)
Discussion started by: pmsuper
3 Replies

10. Shell Programming and Scripting

Help with Mailx

Hi , I have written below code to send email from unix. The code is getting executed fine but i am not receiving any e mail . I am not sure what is going wrong . Do we need to do any configration setting before using Mailx? Please help set -vx echo 'Sending Mail' mailx -s "SEPA_TEST"... (2 Replies)
Discussion started by: Chandru_Raj
2 Replies
Log::Dispatch::Email(3) 				User Contributed Perl Documentation				   Log::Dispatch::Email(3)

NAME
Log::Dispatch::Email - Base class for objects that send log messages via email SYNOPSIS
package Log::Dispatch::Email::MySender use Log::Dispatch::Email; use base qw( Log::Dispatch::Email ); sub send_email { my $self = shift; my %p = @_; # Send email somehow. Message is in $p{message} } DESCRIPTION
This module should be used as a base class to implement Log::Dispatch::* objects that send their log messages via email. Implementing a subclass simply requires the code shown in the SYNOPSIS with a real implementation of the "send_email()" method. CONSTRUCTOR
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output: o subject ($) The subject of the email messages which are sent. Defaults to "$0: log email" o to ($ or @) Either a string or a list reference of strings containing email addresses. Required. o from ($) A string containing an email address. This is optional and may not work with all mail sending methods. o buffered (0 or 1) This determines whether the object sends one email per message it is given or whether it stores them up and sends them all at once. The default is to buffer messages. METHODS
o send_email(%p) This is the method that must be subclassed. For now the only parameter in the hash is 'message'. o flush If the object is buffered, then this method will call the "send_email()" method to send the contents of the buffer and then clear the buffer. o DESTROY On destruction, the object will call "flush()" to send any pending email. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.12.1 2009-09-22 Log::Dispatch::Email(3)
All times are GMT -4. The time now is 01:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy