Mailx: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 11: Line 11:
=Configuration=
=Configuration=


==Configuring mailx to Use a Google SMTP Server==
==Verbose and Debug Output==


First, you will need to make sure <tt>mailx</tt> has access to a valid Google certificate in an NSS certificates database.
In order to get verbose output, use the <tt>-v</tt> on mailx command line. This will send verbose output to stdout as the e-mail is being sent.


* http://www.systutorials.com/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/
The <tt>debug</tt> option dumps the protocol headers, but it configures mailx to '''not''' send anything externally - no connection is attempted:
 
<pre>
...
set debug
...
</pre>
 
==Configuring mailx to Relay via a Google SMTP Server==
 
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
:[[Configure mailx to Relay via a Google SMTP Server]]
</blockquote>
 
=Using from Command Line=
 
<pre>
echo "test" | mailx -A gmail -s "test" test@example.com
</pre>

Latest revision as of 07:41, 17 March 2016

Internal

Installation

yum install mailx

Configuration

Verbose and Debug Output

In order to get verbose output, use the -v on mailx command line. This will send verbose output to stdout as the e-mail is being sent.

The debug option dumps the protocol headers, but it configures mailx to not send anything externally - no connection is attempted:

...
set debug
...

Configuring mailx to Relay via a Google SMTP Server

Configure mailx to Relay via a Google SMTP Server

Using from Command Line

echo "test" | mailx -A gmail -s "test" test@example.com