From 67313d0796b87d31eae2809e9a36e55b69764d66 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 13 Mar 2018 15:52:37 +0530 Subject: added email template function --- tbc_external_review_email.inc | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 tbc_external_review_email.inc (limited to 'tbc_external_review_email.inc') diff --git a/tbc_external_review_email.inc b/tbc_external_review_email.inc new file mode 100755 index 0000000..0afa798 --- /dev/null +++ b/tbc_external_review_email.inc @@ -0,0 +1,57 @@ + params['tbc_review_comment_email_attachment']['preference_id']); + $result = db_query($query, $args); + $row = $result->fetchObject(); + $review_no = suffix($row->review); + $message['attachments'] = $params['tbc_review_comment_email_attachment']['attachments']; + $user_data = user_load($params['tbc_review_comment_email_attachment']['user_id']); + $message['headers'] = $params['tbc_review_comment_email_attachment']['headers']; + $message['subject'] = t('[!site_name][Textbook companion] Scilab Textbook Companion -'. $review_no . 'Review', array( + '!site_name' => variable_get('site_name', '') + ), array( + 'language' => $language->language + )); + $message['body'] = array( + 'body' => t(' +Dear '. $row->name, + +'Please find the attached file containing the list of errors found in your uploaded book:' +'Book: ' . $row->book . +'Author: '. $row->author . + +'Review Number:' . $review_no . + +'Kindly rectify the errors and re-upload the codes on the website. + Reply to this mail once the corrections are done. + +Note: The attachment is a comma separated file, which can be viewed using any office software. + +Best Wishes, + +Scilab TBC Team, +FOSSEE, IIT Bombay', array( + '!site_name' => variable_get('site_name', ''), + ), array( + 'language' => $language->language + )) + ); + break; + + } //$key +} -- cgit