How do I send email from command prompt?


 
Thread Tools Search this Thread
Top Forums Programming How do I send email from command prompt?
# 1  
Old 04-10-2007
How do I send email from command prompt?

hi all
How do I send email from command prompt?
i tried this
[root@localhost ~]# mutt -s "Test mail" -a /root/Desktop/email1.txt XXXXX@yahoo.co.in < /root/Desktop/email.txt
Error sending message, child exited 71 (Operating system error.).
Segmentation fault
[root@localhost ~]#
and also

root@localhost ~]# /bin/mail -s "what r u doing" "email id removed" < /root/Desktop/email.txt
/etc/mail/submit.cf: line 545: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[root@localhost ~]#


can you help me

thank you in advance

Last edited by blowtorch; 04-10-2007 at 06:24 AM.. Reason: remove email id.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need command to capture word from shell script and send email

Hello Experts, Greeting to all of you. I have a requirement, that we have a shell script status.sh that check the status of server and server status shows as status.sh Enterprise Server - Running Admin Server - Shutdown Requirement is like whenever the output shows shutdown it should... (2 Replies)
Discussion started by: aks_1902
2 Replies

2. Shell Programming and Scripting

Run remote command and send email

I am currently try to write a simple script with the following condition, but so far not having luck as the exit code would always be 0. Run remote command to read a file and grep for test word. if test word is in the file, send email. if not, do nothing also possible to ssh to multiple... (3 Replies)
Discussion started by: jaapar
3 Replies

3. Shell Programming and Scripting

Send output of a command as an email

Hello Unix Experts! We are on AIX 6.1 TL6 I am trying to develop a script that does the following: It should send the output of "df -g /directory/folder" command as an email to a user(someone@company.com) This is too simple and i can research on how to do it, but it would be great if... (2 Replies)
Discussion started by: atechcorp
2 Replies

4. Windows & DOS: Issues & Discussions

[Template] Send SMTP email with Visual Basic Script (vbs) from Command Prompt using CDO

This is a script in visual basic that basically sends an email from an existing account, in this case the example is provided for live.com. It uses CDO (Collaboration Data Objects). All you need to do is replace the fields with the proper information. The email is send from Command Prompt... (0 Replies)
Discussion started by: Tribe
0 Replies

5. UNIX Desktop Questions & Answers

Send Email from command line in Ubuntu 11.10

Have problem to send email from command line according to the posts like this one: To have the ability to send email from the command line, you will need to install the mailutils and postfix packages with the following commands. apt-get install mailutils apt-get install postfix Now... (1 Reply)
Discussion started by: yifangt
1 Replies

6. Shell Programming and Scripting

Script to Send an email using mail command

Hello all I'm trying to write a script to send an email, so I can be nnotified when something is going wrong with my system. I've tried many options with no luck: mail -s "You've got mail" somebody@example.com echo "Mail Body" | mail -s "Subject" somebody@example.com I tried also to... (1 Reply)
Discussion started by: samer.odeh
1 Replies

7. Shell Programming and Scripting

How to send command and respond to prompt

I m totally new to this so excuse my ignorance. I want to write a small and simple script to execute in terminal on my MAC. I want to be able to send a ssh command and then once connected send the password and once logged in send two commands. I can easily write the script to connect, but then... (2 Replies)
Discussion started by: NOYB111
2 Replies

8. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

9. UNIX for Dummies Questions & Answers

Not able to send email as CC to a ID using Mailx command in HP UX

Hey Guys, I have been trying to send a email as ccto a email ID .However it seems the -c option is not working in HP UX system. It is shooting an error as "mailx: illegal option -- c" My script isin the below manner: mailx -c EMAIL_IDS_CC# -s 'BDC reminder' -r sender@email.com... (1 Reply)
Discussion started by: rohit.shetty84
1 Replies

10. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
Login or Register to Ask a Question
icapnotify(1M)															    icapnotify(1M)

NAME
icapnotify - Test email connectivity to HP for Instant Capacity (iCAP) systems. Request a confirmation response email from HP. Turn config- uration change notification and asset reporting on or off. SYNOPSIS
icapnotify <reply_address> icapnotify -a on|off icapnotify -n on|off Obsolescent: icod_notify <reply_address> icod_notify -a on|off icod_notify -n on|off DESCRIPTION
When a reply_address is specified, sends an asset report via email to HP, root, and the specified email address. Confirmation email is sent from HP to the specified reply email address indicating that HP received the asset report email. Note that asset reporting is optional but can be useful for viewing complexwide asset information at the HP Utility Pricing Solutions por- tal (http://www.hp.com/go/icap/portal). The deprecated command provides identical functionality to the command and is maintained for backward compatibility. For detailed information on email configuration and requirements, see the located at /usr/share/doc/icapUserGuide.pdf. Options The command recognizes these options and arguments: -a on|off Turns email asset reporting on or off. This option is used to specify if the Instant Capacity software should send asset reports to HP via email. The command displays the present setting for this option. -n on|off Turns configuration change notification on or off. If specified on, executing the command results in a configuration change notification email sent to the system contact email address summarizing any configuration change. Configuration change notification email can be turned off by specifying off. Configuration change notifications are not sent if the system contact email address is not set. EXTERNAL INFLUENCES
Environment Variables o LANG determines the locale to use for the locale categories when both LC_ALL and the corresponding environment variable (begin- ning with LC_) do not specify a locale. If LANG is not set or is set to the empty string, a default of C is used (see lang(5)). o LC_CTYPE determines the interpretation of single- and multiple-byte characters. o LC_MESSAGES determines the language in which messages are displayed. If any internationalization variable contains an invalid setting, icapnotify behaves as if all internationalization variables are set to C (see environ(5)). International Code Set Support Single- and multiple-byte character code sets are supported. RETURN VALUE
The command exits with one of these values: 0 Command succeeded. >0 Command failed; error message sent to STDERR. EXAMPLES
Test email connectivity with HP by sending an asset report to HP, root , and super_user@corp.com, and request a confirmation email from HP to be sent to super_user@corp.com: icapnotify super_user@corp.com Turn email asset reporting on: icapnotify -a on Turn email asset reporting off: icapnotify -a off Turn configuration change notification on: icapnotify -n on Turn configuration change notification off: icapnotify -n off AUTHOR
was developed by HP. SEE ALSO
icapmodify(1M), icapstatus(1M), icapmanage(1M), icapd(1M), icap(5). icapnotify(1M)