aboutsummaryrefslogtreecommitdiff
path: root/src/palhm/__init__.py
diff options
context:
space:
mode:
authorDavid Timber <dxdt@dev.snart.me>2022-05-29 13:55:16 +0800
committerDavid Timber <dxdt@dev.snart.me>2022-05-29 13:55:16 +0800
commitdecf814739a83cb30dff49c89de5152178052c02 (patch)
treef480bed0a7a68c6a5382a799b0fac38cd813eeed /src/palhm/__init__.py
parent359971dbf81a6c1de2f4e6cfa59e7e6dde4a7731 (diff)
boot-report: add "int-opts" in "mua-param"
Diffstat (limited to 'src/palhm/__init__.py')
-rw-r--r--src/palhm/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/palhm/__init__.py b/src/palhm/__init__.py
index 79a6d3f..90de4fc 100644
--- a/src/palhm/__init__.py
+++ b/src/palhm/__init__.py
@@ -584,6 +584,7 @@ class MUA (ABC):
class MailxMUA (MUA):
def __init__ (self, jobj: dict):
self.exec = jobj.get("exec", "/bin/mailx")
+ self.int_opts = jobj.get("int-opts", [])
def __str__ (self) -> str:
return '''mailx:
@@ -595,7 +596,12 @@ class MailxMUA (MUA):
recipients: Iterable[str],
subject: str,
composer: Iterable[str]) -> int:
- argv = [ self.exec, "-s", subject ] + recipients
+ argv = [ self.exec ]
+ for i in self.int_opts:
+ argv.append("-S")
+ argv.append(i)
+ argv += [ "-s", subject ]
+ argv += recipients
with subprocess.Popen(
argv,