diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build_email.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/build_email.php b/src/build_email.php index 41344ca..cad2968 100644 --- a/src/build_email.php +++ b/src/build_email.php @@ -97,6 +97,21 @@ function build_from($name, $email) { return sprintf('%s <%s>', $qname, $email); } +function build_email_subject($forumtag, $reply, $subject) { + $subject = trim($subject); + if ($subject == '') { + $subject = '(no subject)'; + } + + $subject = $forumtag . ' ' . $subject; + + if ($reply) { + $subject = 'Re: ' . $subject; + } + + return utf8_quote_non_ascii($subject); +} + function build_headers($userName, $userEmail, $to, $sender, $subject, $edit, $time, $messageId, $forumURL, $inReplyTo, $references) { |