Sending Email with Netcat

/tmp/message:

HELO host.example.com
MAIL FROM:<test@host.example.com>
RCPT TO:<bob@example.com>
DATA
From: [Alice] <alice@geek.com>
To: <bob@example.com>
Date: Mon, 12 Apr 2010 14:21:26 -0400
Subject: Test Message

Hi there! This is supposed to be a real email…

Have a good day!
Alice

.
QUIT

# /usr/bin/nc smtp.domain.com 25 < /tmp/message

source

Author: WladyX on 21 April, 2010
Category: General, Mail, Scripts

Leave a Reply

Last articles