I have been trying to send an email using mailx from a centos7 machine with no luck.
The command I'm using is:
Code: Select all
echo "what's up" | mailx -S smtps=outlook.office365.com:587 -s from="username1@.co.uk" -v username2@.co.uk
Code: Select all
username2@.co.uk... Connecting to [127.0.0.1] via relay...
220 clinux1.co.uk ESMTP Sendmail 8.14.7/8.14.7; Thu, 24 Aug 2017 15:33:54 +0100
>>> EHLO clinux1.co.uk
250-clinux1.co.uk Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@clinux1.co.uk> SIZE=235 AUTH=root@clinux1.co.uk
250 2.1.0 <root@clinux1.co.uk>... Sender ok
>>> RCPT To:<username2@.co.uk>
>>> DATA
250 2.1.5 <username2@.co.uk>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 v7OEXsWA002179 Message accepted for delivery
username2@.co.uk... Sent (v7OEXsWA002179 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 clinux1.co.uk closing connection
Thank you