User Tools

Site Tools


linux:ubuntu_send_mail_command_line

Ubuntu Send Mail From Command Line

Mail is part of the mailx i.e mailutils on Ubuntu so we will install this first.

Note: mailutils will also spawn the postfix installation. instead of having postfix ask us a lot of questions during install we will install postfix interactively

DEBIAN_FRONTEND=noninteractive apt install -y postfix
apt install mailutils

Mail from command line basic syntax

mail [ options ] -s [ subject ] [recipient_address]
linux/ubuntu_send_mail_command_line.txt · Last modified: 24/11/2023 12:18 by Allan