Skip to content

Commit

Permalink
Always use send_mail() wrapper instead of mail()
Browse files Browse the repository at this point in the history
  • Loading branch information
hannob committed Mar 7, 2024
1 parent 8e6bf02 commit 8901954
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion inc/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,6 @@ function handle_exception($e)
print_r(serialize($_SERVER));
} else {
$msg = "Exception caught:\n" . $e->getMessage() . "\n" . serialize($_POST) . "\n" . serialize($_SERVER);
mail(config("adminmail"), "Exception on configinterface", $msg);
send_mail(config("adminmail"), "Exception on configinterface", $msg);
}
}
4 changes: 2 additions & 2 deletions modules/contacts/include/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ function send_emailchange_token($id, $email)
https://schokokeks.org
';
# send welcome message
mail($email, '=?UTF-8?Q?Best=C3=A4tigung_Ihrer_E-Mail-Adresse?=', $message, "X-schokokeks-org-message: verify\nFrom: " . config('company_name') . ' <' . config('adminmail') . ">\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\n");
// send welcome message
send_mail($email, 'Bestätigung Ihrer E-Mail-Adresse', $message, "verify");
}

function update_pending($contactid)
Expand Down
8 changes: 4 additions & 4 deletions modules/email/include/vmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ function save_vmail_account($account)
(Achten Sie bitte darauf, dass die Verschlüsselung mit SSL oder TLS
aktiviert ist.)
';
# send welcome message
mail($emailaddr, 'Ihr neues Postfach ist bereit', $message, "X-schokokeks-org-message: welcome\nFrom: " . config('company_name') . ' <' . config('adminmail') . ">\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\n");
# notify the vmail subsystem of this new account
#mail('vmail@'.config('vmail_server'), 'command', "user={$account['local']}\nhost={$domainname}", "X-schokokeks-org-message: command");
// send welcome message
send_mail($emailaddr, 'Ihr neues Postfach ist bereit', $message, "welcome");
// notify the vmail subsystem of this new account
//mail('vmail@'.config('vmail_server'), 'command', "user={$account['local']}\nhost={$domainname}", "X-schokokeks-org-message: command");
}

// Clean up obsolete quota
Expand Down
2 changes: 1 addition & 1 deletion modules/vhosts/include/vhosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function make_webapp_vhost($id, $webapp)
$webapp_name = $result->fetch(PDO::FETCH_OBJ)->displayname;
logger(LOG_INFO, 'modules/vhosts/include/vhosts', 'vhosts', 'Setting up webapp ' . $webapp_name . ' on vhost #' . $id);
db_query("REPLACE INTO vhosts.webapps (vhost, webapp) VALUES (?, ?)", [$id, $webapp]);
mail('[email protected]', 'setup', 'setup');
send_mail('[email protected]', 'setup', 'setup');
}


Expand Down

0 comments on commit 8901954

Please sign in to comment.