add PHPMailer (and composer with it) to allow sending mails via authed SNMP

This commit is contained in:
2019-01-24 01:00:08 +01:00
parent 3250792c9d
commit 2e02fca7c3
6 changed files with 150 additions and 15 deletions

View File

@@ -14,13 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function send_mail($receiver, $subject, $body) {
include(__DIR__ . "/../config.php");
$headers = "From: " . $config["register_email"] . "\r\n"
. "Content-Type: text/plain;charset=utf-8";
return mail($receiver, $subject, $body, $headers);
}
function send_mail_pending_verification($homeserver, $user, $receiver, $verify_url) {
$subject = "Bitte bestätige Registrierung auf $homeserver";
$body = "Guten Tag " . $user . ",