# Own modules
from . import __version__ as GLOBAL_VERSION
+from . import MAX_PORT_NUMBER
from fb_tools.common import pp
from .xlate import XLATOR
+from .argparse_actions import PortOptionAction
+
from .mail_config import MailConfiguration
-from .mail_config import VALID_MAIL_METHODS, MAX_PORT_NUMBER
+from .mail_config import VALID_MAIL_METHODS
from .mailaddress import MailAddress
-__version__ = '0.2.2'
+__version__ = '0.2.3'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
super(BaseMailApplication, self).__init__(
appname=appname, verbose=verbose, version=version, base_dir=base_dir,
description=description, cfg_class=cfg_class, initialized=False,
+ argparse_epilog=argparse_epilog, argparse_prefix_chars=argparse_prefix_chars,
+ env_prefix=env_prefix,
)
# -------------------------------------------------------------------------
mail_group.add_argument(
'--smtp-port',
- metavar=_("PORT"), type=int, dest='smtp_port',
+ metavar=_("PORT"), type=int, dest='smtp_port', what="SMTP",
+ action=PortOptionAction,
help=_(
"The port to use for submitting generated by this script if "
"the mail method of this script is 'smtp'. Default: {}.").format(