- $msg["seen"] = 0;
- $msg["replied"] = 0;
-
- DBA::insert('mail', $msg);
-
- $msg["id"] = DBA::lastInsertId();
-
- // send notifications.
- /// @TODO Arange this mess
- $notif_params = [
- "type" => NOTIFY_MAIL,
- "notify_flags" => $importer["notify-flags"],
- "language" => $importer["language"],
- "to_name" => $importer["username"],
- "to_email" => $importer["email"],
- "uid" => $importer["importer_uid"],
- "item" => $msg,
- "source_name" => $msg["from-name"],
- "source_link" => $importer["url"],
- "source_photo" => $importer["thumb"],
- "verb" => ACTIVITY_POST,
- "otype" => "mail"
- ];
-
- notification($notif_params);
-
- Logger::log("Mail is processed, notification was sent.");