Hot answers tagged mailx
mailx can use SMTP. It's configure file is ~/.mailrc One example is mailx using Gmail's SMTP. The configure can even be in one command: mailx -v -s "$EMAIL_SUBJECT" \ -S smtp-use-starttls \ -S ssl-verify=ignore \ -S smtp-auth=login \ -S smtp=smtp://smtp.gmail.com:587 \ -S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)" \ -S smtp-auth-user=$FROM_EMAIL_ADDRESS ...
Normally, mail and derivatives (and almost any other Unix MUA) use the traditional sendmail interface - /usr/bin/sendmail, provided by almost all MTAs (postfix, exim, sendmail, courier). This is the traditional Unix way. Once a message is submitted through sendmail, your MTA handles message transmission. Depending on configuration, it may either connect ...
I would advise to use sendEmail: sendEmail-1.56 by Brandon Zehm <firstname.lastname@example.org> Synopsis: sendEmail -f ADDRESS [options] Required: -f ADDRESS from (sender) email address * At least one recipient required via -t, -cc, or -bcc * Message body required via -m, STDIN, or -o message-file=FILE Common: -t ADDRESS ...
Instead of specifying the recipient on the command line, call sendmail with -t and have your script generate a to: header. (You might as well do a subj: header while you're at it.) Then when there's no output, there's no recipient, and thus no mail.
The easiest way would be to call sendmail fom within your script. That way you can control whether or not any mail is sent to you. Alternatively, you could make your script return a success code if it fails and run sendmail only if the script exits "correctly": $ my-job >/tmp/message && cat /tmp/message | sendmail The && tells bash to ...
If this computer is located on a home network connection, you are likely blocked by your ISP from sending mail directly. Most ISPs expect you to authenticate to their mail server to send mail. In that case, follow these slackware specific directions to set up Client-Side SMTP AUTH + SMART_HOST
Found it. To open without being kicked out if there's no new mail: mailx -f To get the header list again once in: h
The mail terminal program should do the trick. It usually works "straight out of the box" to allow users/programs to send messages locally, inside the system. Type mail -s 'subject line' email@example.com and hit return. Then type your message and close/send using Ctl-D.
The following depends on your installed MTA, but because of security implications, mail is usually not delivered to root. You need to set up root as a mail alias to one of your "normal" users and read root's mail in that mailbox.
there is an alternative without local mta like sendmail/postix. debian package ssmtp info from rpm description: Summary : Extremely simple MTA to get mail off the system to a Mailhub URL : http://packages.debian.org/stable/mail/ssmtp License : GPLv2+ Description : A secure, effective and simple way of getting mail off a system to your mail ...
Have you read the manpage man mailx? Look for write (w) command. This can write attachments.
Only top voted, non community-wiki answers of a minimum length are eligible