issue warning on empty subject line

This commit is contained in:
Jeremy Baxter 2024-06-05 11:11:29 +12:00
parent ef2be37e23
commit e9d4bbcdca

7
mal.d
View file

@ -71,10 +71,9 @@ main(string[] args)
fqdn = hostName() ~ ".local"; fqdn = hostName() ~ ".local";
mailHeaders = toAddrs = []; mailHeaders = toAddrs = [];
subject = "";
useSmtps = true; useSmtps = true;
authUser = message = messageFile = passPhrase = authUser = message = messageFile = passPhrase =
realName = serverAddr = serverPort = null; realName = serverAddr = serverPort = subject = null;
try { try {
import std.getopt : config; import std.getopt : config;
@ -162,6 +161,10 @@ main(string[] args)
warn("warning: -P not supplied, using empty passphrase"); warn("warning: -P not supplied, using empty passphrase");
passPhrase = ""; passPhrase = "";
} }
if (!subject) {
warn("warning: -S not supplied, using empty subject line");
subject = "";
}
try { try {
messageBuf = messageBuf =