- introduce and test BccSelf config, to prevent bcc-self on outgoing mails

- introduce context.get_config_int() which respects default values
  declared in config.rs (Config)
This commit is contained in:
holger krekel
2019-10-02 20:15:12 +02:00
parent 489cdd1b24
commit 92438737c9
5 changed files with 55 additions and 40 deletions

View File

@@ -143,16 +143,11 @@ impl<'a> MimeFactory<'a> {
/*******************************************************************************
* Render a basic email
******************************************************************************/
// restrict unsafe to parts, introduce wrapmime helpers where appropriate
// XXX restrict unsafe to parts, introduce wrapmime helpers where appropriate
pub unsafe fn render(&mut self) -> Result<(), Error> {
if self.loaded == Loaded::Nothing || !self.out.is_null() {
bail!("Invalid use of mimefactory-object.");
}
ensure!(
!self.recipients_names.is_empty() && !self.recipients_addr.is_empty(),
"message has no recipients"
);
let context = &self.context;
let from = wrapmime::new_mailbox_list(&self.from_displayname, &self.from_addr);