diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-21 22:55:13 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-21 22:55:13 +0100 |
| commit | f9ad3f4dc05252839457579303a4e0a0f94d8b80 (patch) | |
| tree | c78b8b5ce41f1a1dc1a8b5e6bbda2643729d7c4e /src/app/Mail.php | |
| parent | ec77d2f77b96488b1bc170ced2abab12b3c19416 (diff) | |
| download | camagru-f9ad3f4dc05252839457579303a4e0a0f94d8b80.tar.gz camagru-f9ad3f4dc05252839457579303a4e0a0f94d8b80.zip | |
Add likes, comments, email notifications, and pagination to gallery
Diffstat (limited to 'src/app/Mail.php')
| -rw-r--r-- | src/app/Mail.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app/Mail.php b/src/app/Mail.php index 054c6e0..650c5b3 100644 --- a/src/app/Mail.php +++ b/src/app/Mail.php @@ -28,6 +28,16 @@ class Mail return self::send($to, $subject, $body); } + public static function sendCommentNotification(string $to, string $commenterUsername, int $postId): bool + { + $url = getenv('APP_URL') . '/gallery#post-' . $postId; + $subject = 'Camagru — New comment on your post'; + $body = '<p><strong>' . htmlspecialchars($commenterUsername) . '</strong> commented on your post.</p>' + . '<p><a href="' . htmlspecialchars($url) . '">View the comment</a></p>'; + + return self::send($to, $subject, $body); + } + public static function sendPasswordReset(string $to, string $token): bool { $url = getenv('APP_URL') . '/reset-password?token=' . urlencode($token); |
