General :: Send Email From Command Line?

Mar 2, 2011

I'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My sendmail.mc file is as follows

Code:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl

When I try to send a test mail via

[Code]....

View 14 Replies


ADVERTISEMENT

General :: Send Email With Attachment By Postfix From Command-line?

Dec 11, 2010

I've just setup a new Ubuntu 10.04 LTS server on linode for myself. Followed an excellent instruction at: here to finish the installation of some basic stuff including postfix.

I am trying to figure out a way to send an email to my gmail address with an attachment, but cannot find how. Already confirmed that email can reach my gmail account.

In the end I have to use mutt to send the email with attachments, probably SendEmails will also do well, but I am wondering how to do the same thing in postfix from command-line?

View 3 Replies View Related

Fedora Servers :: Send Email From Command Line?

Mar 14, 2009

How to sending email from command line? Im just try send email look at below:

Code:
[root@fedora sniper]# echo "test" | mail -v -s test tazmanic76@hotmail.com
tazmanic76@hotmail.com... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.14.3/8.14.3; Sat, 14 Mar 2009 15:50:43 +0800
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
[Code]....

View 4 Replies View Related

Debian Configuration :: Can't Send Email From Command Line Using Mail

Mar 17, 2010

I'm running a desktop-less version of Debian via Sun VirtualBox. The reason I'm doing this is because I don't have enough graphics or RAM power to have a desktop environment running on top of my current desktop; also, I want to learn Linux through the command prompt. I'm running the AMD64 version of Debian; I'm not sure if that's relevant.

My main goal is to be able to email useful files from the virtual Debian to my main computer, so that I can save them for later if I ever decide to do a "real" installation of Debian on this computer. I realize now that there's probably some "easy" way to do this by reading the virtual machine's hard drive, but at this point, my curiosity wants to see this issue resolved. I started off wanting to find a command-line program to send my email with, and one was built-in. The syntax ~$ sudo mail -s "Subject" email@yahoo.com "This is a test email."

C^D
Cc:C^D ~$

is what I found. I tried it, and (unsurprisingly), it failed. I then learned that the mail command calls exim4, or something along those lines, so I needed to configure exim4. Soon thereafter, I learned that Yahoo's SMTP wasn't public, but Google's was. So, I found this web page which described how to configure exim4 to allow for email to be sent to a Gmail account. I made one, and followed the page word-for-word.

I sudo-mailled a test email to my Gmail account, and nothing happened. I waited a bit longer, and still, nothing happened. Finally, I started looking around, and found out about the exim4 logs in /var/log/exim4. In my mainlog, I think that it's telling me that Google denied my connection: <date><time><random numbers and letters> == **********.gmail.com R=send_via_gmail t=gmail_smtp defer (111): Connection refused

So, now, I'm just stuck. I don't know what I did wrong, I checked my exim4.conf.template twice for spelling errors, but I don't think I made any. At this point, I can only hope that someone else has had a similar problem, or knows what I'm doing wrong (or haven't done yet).

View 14 Replies View Related

Ubuntu :: Send An Email To A Gmail Account From The Command Line?

Mar 2, 2011

i am working on a neat little bash script, and i want the output to be mailed to my email account. So far i have tried installing sendmail then running: mail -s Test myemail@gmail.com But that hasn't worked; and i did check my spam folder. Am i missing something or is there a better technique all together?

View 8 Replies View Related

Ubuntu Servers :: Send Email From Command Line / Batch Script

Jul 1, 2011

Is there a way to send an email from a batch script. I want to send the output from a script to an email address, possibly a couple of email addresses depending on the output.

View 3 Replies View Related

Ubuntu Servers :: Use The Mail Command Line Program To Occasionally Send Log Output To Email Aliases?

Jan 27, 2011

Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.

View 2 Replies View Related

General :: Command Based Email Client To Send Email Through Secure Smtp?

Jul 26, 2010

In my Windows environment, I use email client such as Microsoft Outlook to connect to our email server to send email with the following configuration:

Incoming server (POP3): 995 - (requires with SSL)
Outgoing server (SMTP): 465 - (use encrypted connection SSL)

[code]....

And the mail server requires user ID login and password.how do I setup a text command based email client in my Linux (Centos 5.1) to send out email through the existing email server above, which is in another machine? The email client has to be text command based because I need to use command line to send notification email from anothar application installed in my Linux (Centos 5.1) Since the email client will only be used to send email notification, I don't require setting up of an email server in my linux.

View 2 Replies View Related

General :: Send Internal Email Using The Mail Command?

Jun 3, 2009

Send an E-mail to your local account. Try two different ways to send and read it. How can you check that it really arrived? I decided to try using the 'mail' and 'pine' commands. So:

1) Using the root account, intending to send an e-mail to myself (root):

Code:

# mail -s "Hello root!" root
Simple form of sending e-mails internally.
^D (this keystroke is to finish the e-mail)
EOT

2) Using 'pine', another e-mail client: The mail is composed correctly, with 'To:' field set to:

Quote:

[URL]

which is my hostname, as my box runs in a VMWare Slack 12.2 image. In both cases, nothing was received in my mailbox (by typing #mail)... Additionally I don't see any new e-mails when I look at the file '/var/spool/mail/root'. Do I need extra information configuring my mail client/server/service?

View 6 Replies View Related

Ubuntu :: Email To Be Send From Only One Line?

Aug 11, 2010

I have a server ubuntu 9.10.I have 2 adsl lines, one with a static ip for incoming mail and a dynamicI have to do this to have backup.Is it possible to set the server so it will only use the line with the static ip to send email?At the moment the server uses both. It authenticates with the one supplier when it uses the other line.The problem is that when a mall comes in and has a forwarder on my server the supplier blocks it as it thinks it is spam, because it is send from another email. My IT guy is really battling to sort this out.

View 2 Replies View Related

General :: Command Line Email (Gmail) Setup

Sep 18, 2010

I am pretty new to C.L.I/text editing work. So maybe its a bit old-fashioned but I am interested in learning how to send email via the command line. I am running 10.04 32 bit

Situation: I have followed the explicit and step-by-step actions at http://klenwell.com/is/UbuntuCommandLineGmail

Question: Upon completion, when trying to send a test email to myself via gmail (from CLI) I get the following error: "msmtp: no recipients found". In CLI below it asks me to explicitly pick a mailx to download. I think I already have mailx as when I type mailx I get "no mail for primary".

Here is my work
Code:
:~$ sudo apt-get install msmtp mailx
[sudo] password for:
Reading package lists... Done
Building dependency tree
Reading state information... Done
msmtp is already the newest version.
Package mailx is a virtual package provided by:
mailutils 1:2.1+dfsg1-4ubuntu1
heirloom-mailx 12.4-1.1
bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1

You should explicitly select one to install.
E: Package mailx has no installation candidate
:~$ gedit ~/.msmtprc
:~$ chmod 600 ~/.msmtprc
:~$ gedit ~/.mailrc
:~$ echo -e "testing email from the command line" > /tmp/test_email
:~$ mailx -s "mailx gmail test" xxxxxxx@gmail.com < /tmp/test_email
msmtp: no recipients found

Here is ~/.msmtprc
Code:
# config options: [URL]#A-user-configuration-file
defaults
logfile /tmp/msmtp.log
# gmail account
#account gmail
auth on
host smtp.gmail.com
port 587
user xxxxxx@gmail.com
password xxxxxx
from xxxxxx@gmail.com
tls on
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
# set default account to use (not necessary with single account)
#account default : gmail
and here is ~/.mailrc

Code:
# set smtp for mailx
# gmail account (default)
# $ mailx -s "subject line" -a /path/attachment recipient@email.com < /path/body.txt
set from="xxxxxx@gmail.com (xxxxx)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"

View 4 Replies View Related

General :: Send A File From One Computer To Another By Command Line?

Jan 27, 2010

I've got a Debian Squeeze computer on which the graphics have packed up, but the terminal in single user mode work perfectly fine.

There are a few files on this Debian computer that I want to transfer off, to a networked computer, but I have no idea how to do this.

The destination computer is a freshly re-setup Mandriva install, without (as yet) samba. I don't think it's necessary though. The Mandriva install works fine, has graphics, etc, but can't see the Debian Squeeze computer on the network, possibly because it's in single user mode, thus prompting the problem of how to transfer the files, using only a command line.

View 6 Replies View Related

General :: Failing To Send Mail From Command Line?

Mar 16, 2010

I am using Ubuntu 9.10 and when I tried to send mail from the command line I get: /usr/lib/sendmail: Permission denied. any takers on this.

View 6 Replies View Related

General :: Send Gpg Encrypted Mail Automatically From The Command Line?

Sep 14, 2010

How can I send gpg encrypted mail automatically from the linux command line?

I'm a little stumped on this one, I've tried using mutt but it doesn't encrypt mail unless it's used interactively.

Does anyone know if you can use the build in mail command to do this some how?

View 1 Replies View Related

General :: Command Line To Check For A Specific Email - By Subject - On An SSL Secured IMAP Server?

Feb 1, 2011

Anyone know a simple command line to check for a specific email - by subject - on an SSL secured IMAP server?

View 2 Replies View Related

Debian :: Mail Command Can't Send Email?

Jun 4, 2015

I ran this command from terminal.

Code: Select allmail -s "Test Subject" example@yahoo.com < /dev/null

Got error on command line:
Code: Select allsend-mail: Authorization failed (534 5.7.14 https://support.google.com/mail/answer/78754 ng13sm2265977pdb.82 - gsmtp)

ssmtp configuration file:

Code: Select allroot=ssmtpmailtesting@gmail.com
mailhub=smtp.gmail.com:587
#rewriteDomain=
hostname=mybox
UseSTARTTLS=YES
AuthUser=ssmtpmailtesting@gmail.com
AuthPass=[mypassword]
FromLineOverride=YES

View 1 Replies View Related

Fedora Networking :: Configure Sendmail To Send Email From Command Prompt To Any Domain?

Jan 21, 2010

I have an issue with sendmail. I need to configure sendmail to send email from command prompt to any domain. This is just for the notification purpose. I installed sendmail and sendmail-cf and sm-client. The following are the configuration I have done.

/etc/mail/sendmail.mc
1) dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
2) m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
3) /etc/hosts = 127.0.0.1 localhost.localdomain
/etc/hosts = 192.168.2.50 mysystem
4) /etc/hosts.allow = sendmail:ALL
[Code].....

View 1 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

Ubuntu :: Receive Email From The Command Line?

May 20, 2011

Background: I want to send and receive emails from the command line. I'm an OS X immigrant and I don't know my way around a shell. I learned what sudo and man pages are last week. I'm hoping to learn more by doing more in the Terminal, and I check my emails a lot, so that would be a nice place to start. I've had a root around, but there doesn't seem to be much on the relevant fora or wikis to help me. The core of the problem: When I enter

Code:
$ mail
the shell returns
Code:
No mail for USER

I know that there's mail waiting for me. When I log into Gmail in my web browser, I can see it. So, I assume that the problem is that heirloom-mailx (the mail app I've installed) isn't connecting to my Gmail account for some reason. I originally also noticed that I couldn't send emails by typing

Code:
$ mail name@address.tld but I found this post, and after following the steps it outlines, I have successfully composed and sent mail from the command line. I assume that I have just missed some fundamental final step in linking my Gmail account with mailx.

Do you know what I need to do to fix this? I'm really enjoying getting to grips with Linux, and I don't want to be stopped now by what seems to be such a piffling problem.

View 9 Replies View Related

Server :: Send An E-mail With The Command Line?

Sep 12, 2010

I want to send a simple mail from my terminal

I'm using opensuse and a Know that I have postfix installed...

I don't know what I need configure first...

I know that I need a SMTP server to send e-mails write?

When I try send e-mail with the command mail I received this message :

Code:
mail -s "meeting reminder" -c professorgenival@hotmail.com micromerces@gmail.com
mailq:
Code:
(host mx4.hotmail.com [65.55.92.168] refuse to talk to me: 421 cannot conect to SMTP server.

I was reading about fetchmail But I can't understand....

View 4 Replies View Related

Debian :: Any Program To Send Mail From Command Line?

Sep 9, 2010

Is there an easy to use program that I can use to send mail from the command line? I want to be able to create a batch script to send mail from different text files. What I'm looking for is something like:
mailapp mailserveraddress destinationmailaddress mymailaddress filetosend

View 11 Replies View Related

Fedora Networking :: Command Line Email With Att Dsl (stunnel And Ssmtp)?

Jan 26, 2010

I have been trying to get command line email working for cron email reports and such. I have set up stunnel for ssl and this works with thunderbird (set to route through stunnel with no ssl in thunderbird). I am trying to use ssmtp as I don't need all the complexity of sendmail - just trying to use an [URL]..account It complains that my address is not verified. I think the from line is not set up properly but I have been unable to see this in the stunnel logs and ssmtp doesn't seem to have logs. Is there a way to get more logs from stunnel. How do I make sure I am sending the right email and not something like "localhost"?

View 1 Replies View Related

Ubuntu :: Send The Results Of A Command Line $du -max-depth=1 To A Zenity Message Box?

Jun 14, 2010

I'm trying to send the results of a command line $du --max-depth=1 to a zenity message box.I want to create a .sh script that I can run as a Nautilus script that will open a zenity message box with a listing of sub-folders/sizes. $DU with options, will provide the results in a terminal window, but I can't seem to get it into a zenity message box. I've tried gxmessage also, but no go.

View 2 Replies View Related

General :: Email Output Of Cron Command, Sends Email But No Content?

May 28, 2010

Using CentOS. I have a cron setup to run this command: Code: /var/test.sh | mail -s "Test Cron" mr182@somewhere.com The email is sent but the output of the script is not in the email body, it's just blank. I know there is some output because there are some echo statements in the script.I don't want to get an email for all cronjobs, just this one.

View 1 Replies View Related

Ubuntu :: Command Line Mail Taking Too Long To Send; Unable To Qualify Own Domain Name?

Feb 5, 2010

I'm having a problem with my mail. When I send mail, it takes a long time for the send to complete.In the below, datestamp is just a simple script to put in a no-white-space date/time stamp.

Code:
$ datestamp ; mail woodnt; datestamp
02-05-10@193844

[code]....

View 9 Replies View Related

Server :: Allow Unsubscribed Email Address To Send Email To Mailman List?

Jul 1, 2010

is there a way to allow unsubscribed email address to send emails to mailman list without having to manually set a filter for that email address?

View 1 Replies View Related

Software :: Apache Virtual Host Send Email Without Email Server?

Jun 3, 2009

Debian 5, apache 2.2 I've got Apache up and hosting multiple sites. Each site will have a php contact me page that will simply dump an email to a fixed address. What program should i be using to accomplish this? I've used nullmailer before but that assumes you have a fixed smarthost somewhere which I don't.

View 6 Replies View Related

General :: Send The Output Of Send Command To A File?

Jan 20, 2011

in the middle of script, i need to send the output of (send command on line 8) to a file

#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"

[cod]....

i treid the below on line 8 :

1- send "show command;

" > logfile.txt : gives an error extra character after the "

2- logsave logfile.txt 'send "show command;

" ': error invalid command

3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only

4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?

View 2 Replies View Related

OpenSUSE :: Sending Email Using PHP / Application Fails To Send An Email?

Feb 23, 2010

I'm attempting to send email used a textbook PHP application. The application fails to send an email.Do I need to setup an email server to get the ap to work?Right now, I'm getting email through Kontact via my web host, Yahoo mail and Google mail.

View 2 Replies View Related

General :: Cannot Send Email Via Mutt?

Mar 24, 2010

I use CentOS 5.3 and I am trying to send a simple email through mutt.My command is:echo "test" | mutt -s "test email" myemail addressI have no errors displayed but the email never goes out of the machine. Also the /var/log/maillog is empty.I can see the queued email with:sendmail -bpSo emails never go out.This PC is connected to a network which the gateway is another Linux machine which is configured to be the default gateway in my /etc/resolv.conf as nameserver.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved