Mail error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail error
# 1  
Old 07-13-2010
Mail error

Hi All,

I a trying to send a mail from shell script. But it doesn't send the mail to the specified Emailid. Inturn it sends to the Server userid.

Let me know whether i need to include the SMTP server details. If so how?

Code:
 echo "CVS checkout completed" | mail -s "Auto cvs checkout" test.mail@xyz.com

~Vinodh' Kumar
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Linux

Send-mail: fatal error

Hi guys, i am using the below command to send mail mail -s "HI" abcd@how.com < temp_mail.txt I am getting the below error send-mail: fatal: bad string length 0 < 1: myorigin = My os version is as Linux Help me with ur suggestion guys thank u. (3 Replies)
Discussion started by: mohanalakshmi
3 Replies

3. UNIX for Advanced & Expert Users

Error details in mail

Hi, I have a application that writes log details to a file in a folder. I am trying to write script to send mail to the user whenever the log is appended with "Error" string and details. The user should receive error and error details in mail whenever there is a error in the file. The... (4 Replies)
Discussion started by: maddy26615
4 Replies

4. UNIX for Dummies Questions & Answers

No route to host - mail error

A linux box is supposed to emailing the results of backups to the windows exchange server, but nothing arrives. it never has, as the muppet who set up the Windows domain knew nothing about linux. I know only slightly more than that... pretty sure sendmail is the daemon running to handle mail. it... (0 Replies)
Discussion started by: Noewon
0 Replies

5. 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

6. Ubuntu

Error after installing mail server.

Hi all, I'm new here. I already install ubuntu 9.10 and mail server (Dovecot + Postfix + SASL + Squirrel Mail). But after login on squirrelmail. an error message appeared "Error connecting to IMAP server: localhost. 111 : Connection refused". Any solutions? Thanks (1 Reply)
Discussion started by: dnet
1 Replies

7. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

8. HP-UX

-c option gives error in mail

Hi, I am getting illegal option error while using -c to CC in mail. command used: mailx -s "Report" -c xyz@abc.com < /tmp/report Machine: HP UX. Please help me out. Looking you forward. Thanks in Advance. Jagadeesh. (3 Replies)
Discussion started by: bjagadeesh
3 Replies

9. Shell Programming and Scripting

sending mail error.. help

help i get this error when i sending a mail send-mail: fatal: open /etc/postfix/main.cf: No such file or directory Can't send mail: sendmail process failed this is my coding echo "$PRONAME is being restart" | mailxs "Subject:Process" "sally@$THISHOST" i wish to send this mail to my... (2 Replies)
Discussion started by: kkc
2 Replies

10. UNIX for Advanced & Expert Users

Mail Error

Hi When trying to access my UNIX mail account I am getting this error message, can anyone suggest a way to get in and delete some of these messages please? Can I simply delete my mail file or hack it with a text editor? Thanks :confused: (3 Replies)
Discussion started by: deggzy
3 Replies
Login or Register to Ask a Question
Mail::Mailer(3) 					User Contributed Perl Documentation					   Mail::Mailer(3)

NAME
Mail::Mailer - Simple interface to electronic mailing mechanisms INHERITANCE
Mail::Mailer is a IO::Handle SYNOPSIS
use Mail::Mailer; use Mail::Mailer qw(mail); # specifies default mailer $mailer = Mail::Mailer->new; $mailer = Mail::Mailer->new($type, @args); $mailer->open(\%headers); print $mailer $body; $mailer->close or die "couldn't send whole message: $! "; DESCRIPTION
Sends mail using any of the built-in methods. As TYPE argument to new(), you can specify any of "sendmail" Use the "sendmail" program to deliver the mail. "smtp" Use the "smtp" protocol via Net::SMTP to deliver the mail. The server to use can be specified in @args with $mailer = Mail::Mailer->new('smtp', Server => $server); The smtp mailer does not handle "Cc" and "Bcc" lines, neither their "Resent-*" fellows. The "Debug" options enables debugging output from "Net::SMTP". You may also use the "Auth => [ $user, $password ]" option for SASL authentication. To make this work, you have to install the Authen::SASL distribution yourself: it is not automatically installed. "smtps" Use the smtp over ssl protocol via Net::SMTP::SSL to deliver the mail. Usage is identical to "smtp". You have to install Authen::SASL as well. $mailer = Mail::Mailer->new('smtps', Server => $server); "qmail" Use qmail's qmail-inject program to deliver the mail. "testfile" Used for debugging, this displays the data to the file named in $Mail::Mailer::testfile::config{outfile} which defaults to a file named "mailer.testfile". No mail is ever sent. "Mail::Mailer" will search for executables in the above order. The default mailer will be the first one found. METHODS
Constructors Mail::Mailer->new(TYPE, ARGS) The TYPE is one of the back-end sender implementations, as described in the DESCRIPTION chapter of this manual page. The ARGS are passed to that back-end. $obj->open(HASH) The HASH consists of key and value pairs, the key being the name of the header field (eg, "To"), and the value being the corresponding contents of the header field. The value can either be a scalar (eg, "gnat@frii.com") or a reference to an array of scalars ("eg, ['gnat@frii.com', 'Tim.Bunce@ig.co.uk']"). DETAILS
ENVIRONMENT VARIABLES PERL_MAILERS Augments/override the build in choice for binary used to send out our mail messages. Format: "type1:mailbinary1;mailbinary2;...:type2:mailbinaryX;...:..." Example: assume you want you use private sendmail binary instead of mailx, one could set "PERL_MAILERS" to: "mail:/does/not/exists:sendmail:$HOME/test/bin/sendmail" On systems which may include ":" in file names, use "|" as separator between type-groups. "mail:c:/does/not/exists|sendmail:$HOME/test/bin/sendmail" BUGS Mail::Mailer does not help with folding, and does not protect against various web-script hacker attacks, for instance where a new-line is inserted in the content of the field. SEE ALSO
This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/. AUTHORS
The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development. Mail::Cap by Gisle Aas <aas@oslonett.no>. Mail::Field::AddrList by Peter Orbaek <poe@cit.dk>. Mail::Mailer and Mail::Send by Tim Bunce <Tim.Bunce@ig.co.uk>. For other contributors see ChangeLog. LICENSE
Copyrights 1995-2000 Graham Barr <gbarr@pobox.com> and 2001-2007 Mark Overmeer <perl@overmeer.net>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.18.2 2014-01-05 Mail::Mailer(3)