diff --git a/lib/pkp/classes/mail/Mail.inc.php b/lib/pkp/classes/mail/Mail.inc.php
index 50ee9a6..3c02e16 100644
--- a/lib/pkp/classes/mail/Mail.inc.php
+++ b/lib/pkp/classes/mail/Mail.inc.php
@@ -239,6 +239,37 @@ class Mail extends DataObject {
return $this->getData('from');
}
+ /**
+ * Set the reply-to of the message.
+ * @param $email string or null to clear
+ * @param $name string optional
+ */
+ function setReplyTo($email, $name = '') {
+ if ($email === null) $this->setData('replyTo', null);
+ return $this->setData('replyTo', array('name' => $name, 'email' => $email));
+ }
+
+ /**
+ * Get the reply-to of the message.
+ * @return array
+ */
+ function getReplyTo() {
+ return $this->getData('replyTo');
+ }
+
+ /**
+ * Return a string containing the reply-to address.
+ * @return string
+ */
+ function getReplyToString($send = false) {
+ $replyTo = $this->getReplyTo();
+ if ($replyTo == null) {
+ return null;
+ } else {
+ return (Mail::encodeDisplayName($replyTo['name'], $send) . ' <'.$replyTo['email'].'>');
+ }
+ }
+
function setSubject($subject) {
return $this->setData('subject', $subject);
}
@@ -368,6 +399,10 @@ class Mail extends DataObject {
$this->addHeader('From', $from);
}
+ if (($r = $this->getReplyToString()) != '') {
+ $this->addHeader('Reply-To', $r);
+ }
+
$ccs = $this->getAddressArrayString($this->getCcs(), true, true);
if ($ccs != null) {
$this->addHeader('Cc', $ccs);
diff --git a/lib/pkp/templates/email/email.tpl b/lib/pkp/templates/email/email.tpl
index 8644c6b..acebfbd 100644
--- a/lib/pkp/templates/email/email.tpl
+++ b/lib/pkp/templates/email/email.tpl
@@ -144,10 +144,6 @@ function deleteAttachment(fileId) {
|
- | {translate key="email.from"} |
- {$from|escape} |
-
-
| {fieldLabel name="subject" key="email.subject"} |
|
diff --git a/classes/author/form/submit/AuthorSubmitStep5Form.inc.php b/classes/author/form/submit/AuthorSubmitStep5Form.inc.php
index e3581f9..e49f460 100644
--- a/classes/author/form/submit/AuthorSubmitStep5Form.inc.php
+++ b/classes/author/form/submit/AuthorSubmitStep5Form.inc.php
@@ -187,7 +187,7 @@ class AuthorSubmitStep5Form extends AuthorSubmitForm {
// Send author notification email
import('classes.mail.ArticleMailTemplate');
$mail = new ArticleMailTemplate($article, 'SUBMISSION_ACK', null, null, null, false);
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
if ($mail->isEnabled()) {
$mail->addRecipient($user->getEmail(), $user->getFullName());
// If necessary, BCC the acknowledgement to someone.
diff --git a/classes/mail/MailTemplate.inc.php b/classes/mail/MailTemplate.inc.php
index c860fd2..5970df7 100644
--- a/classes/mail/MailTemplate.inc.php
+++ b/classes/mail/MailTemplate.inc.php
@@ -89,8 +89,9 @@ class MailTemplate extends PKPMailTemplate {
// Default "From" to user if available, otherwise site/journal principal contact
$user =& Request::getUser();
if ($user) {
- $this->setFrom($user->getEmail(), $user->getFullName());
- } elseif ($journal == null) {
+ $this->setReplyTo($user->getEmail(), $user->getFullName());
+ }
+ if ($journal == null) {
$site =& Request::getSite();
$this->setFrom($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
@@ -146,16 +147,24 @@ class MailTemplate extends PKPMailTemplate {
*/
function send($clearAttachments = true) {
if (isset($this->journal)) {
- //If {$templateSignature} exists in the body of the
- // message, replace it with the journal signature;
- // otherwise just append it. This is here to
- // accomodate MIME-encoded messages or other cases
- // where the signature cannot just be appended.
- $searchString = '{$templateSignature}';
- if (strstr($this->getBody(), $searchString) === false) {
- $this->setBody($this->getBody() . "\n" . $this->journal->getSetting('emailSignature'));
+ //If {$templateSignature} and/or {$templateHeader}
+ // exist in the body of the message, replace them with
+ // the journal signature; otherwise just pre/append
+ // them. This is here to accomodate MIME-encoded
+ // messages or other cases where the signature cannot
+ // just be appended.
+ $header = $this->journal->getSetting('emailHeader');
+ if (strstr($this->getBody(), '{$templateHeader}') === false) {
+ $this->setBody($header . "\n" . $this->getBody());
+ } else {
+ $this->setBody(str_replace('{$templateHeader}', $header, $this->getBody()));
+ }
+
+ $signature = $this->journal->getSetting('emailSignature');
+ if (strstr($this->getBody(), '{$templateSignature}') === false) {
+ $this->setBody($this->getBody() . "\n" . $signature);
} else {
- $this->setBody(str_replace($searchString, $this->journal->getSetting('emailSignature'), $this->getBody()));
+ $this->setBody(str_replace('{$templateSignature}', $signature, $this->getBody()));
}
$envelopeSender = $this->journal->getSetting('envelopeSender');
diff --git a/classes/manager/form/UserManagementForm.inc.php b/classes/manager/form/UserManagementForm.inc.php
index 52c89ab..1bb09e8 100644
--- a/classes/manager/form/UserManagementForm.inc.php
+++ b/classes/manager/form/UserManagementForm.inc.php
@@ -356,7 +356,7 @@ class UserManagementForm extends Form {
// Send welcome email to user
import('classes.mail.MailTemplate');
$mail = new MailTemplate('USER_REGISTER');
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
$mail->addRecipient($user->getEmail(), $user->getFullName());
$mail->send();
diff --git a/classes/manager/form/setup/JournalSetupStep1Form.inc.php b/classes/manager/form/setup/JournalSetupStep1Form.inc.php
index a292fba..9f96b02 100644
--- a/classes/manager/form/setup/JournalSetupStep1Form.inc.php
+++ b/classes/manager/form/setup/JournalSetupStep1Form.inc.php
@@ -54,6 +54,7 @@ class JournalSetupStep1Form extends JournalSetupForm {
'contributors' => 'object',
'history' => 'string',
'envelopeSender' => 'string',
+ 'emailHeader' => 'string',
'emailSignature' => 'string',
'searchDescription' => 'string',
'searchKeywords' => 'string',
diff --git a/classes/sectionEditor/form/CreateReviewerForm.inc.php b/classes/sectionEditor/form/CreateReviewerForm.inc.php
index 15b2ab9..b919ce1 100644
--- a/classes/sectionEditor/form/CreateReviewerForm.inc.php
+++ b/classes/sectionEditor/form/CreateReviewerForm.inc.php
@@ -196,7 +196,7 @@ class CreateReviewerForm extends Form {
// Send welcome email to user
import('classes.mail.MailTemplate');
$mail = new MailTemplate('REVIEWER_REGISTER');
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
$mail->addRecipient($user->getEmail(), $user->getFullName());
$mail->send();
diff --git a/classes/submission/form/comment/CommentForm.inc.php b/classes/submission/form/comment/CommentForm.inc.php
index cda11e7..0bae308 100644
--- a/classes/submission/form/comment/CommentForm.inc.php
+++ b/classes/submission/form/comment/CommentForm.inc.php
@@ -132,7 +132,7 @@ class CommentForm extends Form {
import('classes.mail.ArticleMailTemplate');
$email = new ArticleMailTemplate($article, 'SUBMISSION_COMMENT');
- $email->setFrom($this->user->getEmail(), $this->user->getFullName());
+ $email->setReplyTo($this->user->getEmail(), $this->user->getFullName());
$commentText = $this->getData('comments');
diff --git a/classes/submission/form/comment/EditCommentForm.inc.php b/classes/submission/form/comment/EditCommentForm.inc.php
index 7e1597f..f9a1c4b 100644
--- a/classes/submission/form/comment/EditCommentForm.inc.php
+++ b/classes/submission/form/comment/EditCommentForm.inc.php
@@ -294,7 +294,7 @@ class EditCommentForm extends Form {
import('classes.mail.ArticleMailTemplate');
$email = new ArticleMailTemplate($this->article, 'SUBMISSION_COMMENT');
$journal =& Request::getJournal();
- if ($journal) $email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ if ($journal) $email->setReplyTo($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
foreach ($recipients as $emailAddress => $name) {
$email->addRecipient($emailAddress, $name);
diff --git a/classes/submission/reviewer/ReviewerAction.inc.php b/classes/submission/reviewer/ReviewerAction.inc.php
index 31a98f9..5ce4775 100644
--- a/classes/submission/reviewer/ReviewerAction.inc.php
+++ b/classes/submission/reviewer/ReviewerAction.inc.php
@@ -54,7 +54,7 @@ class ReviewerAction extends Action {
$email = new ArticleMailTemplate($reviewerSubmission, $decline?'REVIEW_DECLINE':'REVIEW_CONFIRM');
// Must explicitly set sender because we may be here on an access
// key, in which case the user is not technically logged in
- $email->setFrom($reviewer->getEmail(), $reviewer->getFullName());
+ $email->setReplyTo($reviewer->getEmail(), $reviewer->getFullName());
if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
HookRegistry::call('ReviewerAction::confirmReview', array(&$reviewerSubmission, &$email, $decline));
if ($email->isEnabled()) {
@@ -148,7 +148,7 @@ class ReviewerAction extends Action {
$email = new ArticleMailTemplate($reviewerSubmission, 'REVIEW_COMPLETE');
// Must explicitly set sender because we may be here on an access
// key, in which case the user is not technically logged in
- $email->setFrom($reviewer->getEmail(), $reviewer->getFullName());
+ $email->setReplyTo($reviewer->getEmail(), $reviewer->getFullName());
if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
diff --git a/classes/subscription/SubscriptionAction.inc.php b/classes/subscription/SubscriptionAction.inc.php
index 41b8e7f..8d21ce4 100755
--- a/classes/subscription/SubscriptionAction.inc.php
+++ b/classes/subscription/SubscriptionAction.inc.php
@@ -645,7 +645,7 @@ class SubscriptionAction {
import('classes.mail.MailTemplate');
$mail = new MailTemplate($mailTemplateKey);
- $mail->setFrom($subscriptionContactEmail, $subscriptionContactName);
+ $mail->setReplyTo($subscriptionContactEmail, $subscriptionContactName);
$mail->addRecipient($subscriptionContactEmail, $subscriptionContactName);
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
diff --git a/classes/subscription/form/SubscriptionForm.inc.php b/classes/subscription/form/SubscriptionForm.inc.php
index fe6784f..3f70740 100755
--- a/classes/subscription/form/SubscriptionForm.inc.php
+++ b/classes/subscription/form/SubscriptionForm.inc.php
@@ -300,7 +300,7 @@ class SubscriptionForm extends Form {
import('classes.mail.MailTemplate');
$mail = new MailTemplate($mailTemplateKey);
- $mail->setFrom($subscriptionEmail, $subscriptionName);
+ $mail->setReplyTo($subscriptionEmail, $subscriptionName);
$mail->addRecipient($user->getEmail(), $user->getFullName());
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
diff --git a/classes/tasks/OpenAccessNotification.inc.php b/classes/tasks/OpenAccessNotification.inc.php
index 717156f..baa6c5e 100644
--- a/classes/tasks/OpenAccessNotification.inc.php
+++ b/classes/tasks/OpenAccessNotification.inc.php
@@ -37,7 +37,7 @@ class OpenAccessNotification extends ScheduledTask {
$email = new MailTemplate('OPEN_ACCESS_NOTIFY', $journal->getPrimaryLocale());
$email->setSubject($email->getSubject($journal->getPrimaryLocale()));
- $email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $email->setReplyTo(null);
$email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
$paramArray = array(
diff --git a/classes/tasks/ReviewReminder.inc.php b/classes/tasks/ReviewReminder.inc.php
index aa09cbc..024a0a2 100644
--- a/classes/tasks/ReviewReminder.inc.php
+++ b/classes/tasks/ReviewReminder.inc.php
@@ -40,7 +40,7 @@ class ReviewReminder extends ScheduledTask {
$email = new ArticleMailTemplate($article, $reviewerAccessKeysEnabled?'REVIEW_REMIND_AUTO_ONECLICK':'REVIEW_REMIND_AUTO', $journal->getPrimaryLocale(), false, $journal);
$email->setJournal($journal);
- $email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $email->setReplyTo(null);
$email->addRecipient($reviewer->getEmail(), $reviewer->getFullName());
$email->setAssoc(ARTICLE_EMAIL_REVIEW_REMIND, ARTICLE_EMAIL_TYPE_REVIEW, $reviewId);
diff --git a/classes/tasks/SubscriptionExpiryReminder.inc.php b/classes/tasks/SubscriptionExpiryReminder.inc.php
index 86f05e6..bbc1560 100644
--- a/classes/tasks/SubscriptionExpiryReminder.inc.php
+++ b/classes/tasks/SubscriptionExpiryReminder.inc.php
@@ -71,7 +71,7 @@ class SubscriptionExpiryReminder extends ScheduledTask {
import('classes.mail.MailTemplate');
$mail = new MailTemplate($emailKey, $journal->getPrimaryLocale());
- $mail->setFrom($subscriptionEmail, $subscriptionName);
+ $mail->setReplyTo($subscriptionEmail, $subscriptionName);
$mail->addRecipient($user->getEmail(), $user->getFullName());
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
diff --git a/classes/user/form/RegistrationForm.inc.php b/classes/user/form/RegistrationForm.inc.php
index 9d19a56..509d312 100644
--- a/classes/user/form/RegistrationForm.inc.php
+++ b/classes/user/form/RegistrationForm.inc.php
@@ -307,7 +307,7 @@ class RegistrationForm extends Form {
// Send email validation request to user
$mail = new MailTemplate('USER_VALIDATE');
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
$mail->assignParams(array(
'userFullName' => $user->getFullName(),
'activateUrl' => Request::url($journal->getPath(), 'user', 'activateUser', array($this->getData('username'), $accessKey))
@@ -319,7 +319,7 @@ class RegistrationForm extends Form {
if ($this->getData('sendPassword')) {
// Send welcome email to user
$mail = new MailTemplate('USER_REGISTER');
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
$mail->assignParams(array(
'username' => $this->getData('username'),
'password' => String::substr($this->getData('password'), 0, 30), // Prevent mailer abuse via long passwords
diff --git a/locale/en_US/default.xml b/locale/en_US/default.xml
index 59e66d1..cbc29eb 100644
--- a/locale/en_US/default.xml
+++ b/locale/en_US/default.xml
@@ -131,6 +131,8 @@ Please follow the following protocol for making electronic revisions to your man
4. FORMATTING
The paragraph that begins "This last topic..." is not indented.
]]>
+ The following message is being delivered on behalf of {$journalName}.
+________________________________________________________________________
________________________________________________________________________
{$journalName}
{$indexUrl}/{$journalPath}
diff --git a/locale/en_US/manager.xml b/locale/en_US/manager.xml
index 5460520..194062e 100644
--- a/locale/en_US/manager.xml
+++ b/locale/en_US/manager.xml
@@ -260,6 +260,8 @@
Any undeliverable emails will result in an error message to this address.
Note: To activate this option, the site administrator must enable the allow_envelope_sender option in the OJS configuration file. Additional server configuration may be required to support this functionality (which may not be possible on all servers), as indicated in the OJS documentation.]]>
Email Identification
+ Email Header
+ The prepared emails that are sent by the system on behalf of the journal will begin with the following header. These emails will be addressed from the Principal Contact, so it's important to clarify that the Primary Contact is not necessarily responsible for the message content, which may be sent on behalf of a different user.
Signature
The prepared emails that are sent by the system on behalf of the journal will have the following signature added to the end. The body of the prepared emails are available for editing under Journal Management.
Enable Journal Managers to add journal announcements.
diff --git a/pages/login/LoginHandler.inc.php b/pages/login/LoginHandler.inc.php
index c234b88..6e9ed8f 100644
--- a/pages/login/LoginHandler.inc.php
+++ b/pages/login/LoginHandler.inc.php
@@ -95,9 +95,9 @@ class LoginHandler extends PKPLoginHandler {
// Set the sender based on the current context
if ($journal && $journal->getSetting('supportEmail')) {
- $mail->setFrom($journal->getSetting('supportEmail'), $journal->getSetting('supportName'));
+ $mail->setReplyTo($journal->getSetting('supportEmail'), $journal->getSetting('supportName'));
} else {
- $mail->setFrom($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
+ $mail->setReplyTo($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
}
}
diff --git a/plugins/generic/booksForReview/classes/BooksForReviewReminder.inc.php b/plugins/generic/booksForReview/classes/BooksForReviewReminder.inc.php
index 2f92724..ab98ae6 100644
--- a/plugins/generic/booksForReview/classes/BooksForReviewReminder.inc.php
+++ b/plugins/generic/booksForReview/classes/BooksForReviewReminder.inc.php
@@ -40,7 +40,7 @@ class BooksForReviewReminder extends ScheduledTask {
import('classes.mail.MailTemplate');
$mail = new MailTemplate($emailKey);
- $mail->setFrom($book->getEditorEmail(), $book->getEditorFullName());
+ $mail->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
$mail->addRecipient($book->getUserEmail(), $book->getUserFullName());
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
diff --git a/plugins/generic/booksForReview/pages/BooksForReviewAuthorHandler.inc.php b/plugins/generic/booksForReview/pages/BooksForReviewAuthorHandler.inc.php
index d93a222..ab01091 100644
--- a/plugins/generic/booksForReview/pages/BooksForReviewAuthorHandler.inc.php
+++ b/plugins/generic/booksForReview/pages/BooksForReviewAuthorHandler.inc.php
@@ -124,9 +124,6 @@ class BooksForReviewAuthorHandler extends Handler {
$user =& $request->getUser();
$userId = $user->getId();
- $userFullName = $user->getFullName();
- $userEmail = $user->getEmail();
-
$editorFullName = $book->getEditorFullName();
$editorEmail = $book->getEditorEmail();
@@ -137,7 +134,6 @@ class BooksForReviewAuthorHandler extends Handler {
);
$email->addRecipient($editorEmail, $editorFullName);
- $email->setFrom($userEmail, $userFullName);
$email->assignParams($paramArray);
}
$returnUrl = $request->url(null, 'author', 'requestBookForReview', $bookId);
diff --git a/plugins/generic/booksForReview/pages/BooksForReviewEditorHandler.inc.php b/plugins/generic/booksForReview/pages/BooksForReviewEditorHandler.inc.php
index f90f724..865474a 100644
--- a/plugins/generic/booksForReview/pages/BooksForReviewEditorHandler.inc.php
+++ b/plugins/generic/booksForReview/pages/BooksForReviewEditorHandler.inc.php
@@ -662,7 +662,7 @@ class BooksForReviewEditorHandler extends Handler {
);
$email->addRecipient($userEmail, $userName);
- $email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
+ $email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
$email->assignParams($paramArray);
}
$returnUrl = $request->url(null, 'editor', 'assignBookForReviewAuthor', $bookId, array('returnPage' => $returnPage, 'userId' => $userId));
@@ -737,7 +737,7 @@ class BooksForReviewEditorHandler extends Handler {
);
$email->addRecipient($userEmail, $userFullName);
- $email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
+ $email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
$email->assignParams($paramArray);
}
$returnUrl = $request->url(null, 'editor', 'denyBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
@@ -823,7 +823,7 @@ class BooksForReviewEditorHandler extends Handler {
);
$email->addRecipient($userEmail, $userFullName);
- $email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
+ $email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
$email->assignParams($paramArray);
}
$returnUrl = $request->url(null, 'editor', 'notifyBookForReviewMailed', $bookId, array('returnPage' => $returnPage));
@@ -902,7 +902,7 @@ class BooksForReviewEditorHandler extends Handler {
);
$email->addRecipient($userEmail, $userFullName);
- $email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
+ $email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
$email->assignParams($paramArray);
}
$returnUrl = $request->url(null, 'editor', 'removeBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
diff --git a/plugins/generic/sword/SwordPlugin.inc.php b/plugins/generic/sword/SwordPlugin.inc.php
index b3ccdb8..a775dba 100644
--- a/plugins/generic/sword/SwordPlugin.inc.php
+++ b/plugins/generic/sword/SwordPlugin.inc.php
@@ -151,10 +151,8 @@ class SwordPlugin extends GenericPlugin {
$submittingUser =& $sectionEditorSubmission->getUser();
import('classes.mail.ArticleMailTemplate');
- $contactName = $journal->getSetting('contactName');
- $contactEmail = $journal->getSetting('contactEmail');
$mail = new ArticleMailTemplate($sectionEditorSubmission, 'SWORD_DEPOSIT_NOTIFICATION', null, null, $journal, true, true);
- $mail->setFrom($contactEmail, $contactName);
+ $mail->setReplyTo(null);
$mail->addRecipient($submittingUser->getEmail(), $submittingUser->getFullName());
$mail->assignParams(array(
diff --git a/plugins/generic/thesis/StudentThesisForm.inc.php b/plugins/generic/thesis/StudentThesisForm.inc.php
index 2f40e32..735e068 100644
--- a/plugins/generic/thesis/StudentThesisForm.inc.php
+++ b/plugins/generic/thesis/StudentThesisForm.inc.php
@@ -288,10 +288,10 @@ class StudentThesisForm extends Form {
import('classes.mail.MailTemplate');
$mail = new MailTemplate('THESIS_ABSTRACT_CONFIRM');
- $mail->setFrom($thesisEmail, "\"" . $thesisName . "\"");
+ $mail->setReplyTo($thesisEmail, $thesisName);
$mail->assignParams($paramArray);
- $mail->addRecipient($thesis->getSupervisorEmail(), "\"" . $supervisorName . "\"");
- $mail->addCc($thesis->getStudentEmail(), "\"" . $studentName . "\"");
+ $mail->addRecipient($thesis->getSupervisorEmail(), $supervisorName);
+ $mail->addCc($thesis->getStudentEmail(), $studentName);
$mail->send();
}
diff --git a/plugins/importexport/users/UserXMLParser.inc.php b/plugins/importexport/users/UserXMLParser.inc.php
index 93110c6..23b69ce 100644
--- a/plugins/importexport/users/UserXMLParser.inc.php
+++ b/plugins/importexport/users/UserXMLParser.inc.php
@@ -195,7 +195,7 @@ class UserXMLParser {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journal =& $journalDao->getJournal($this->journalId);
- $mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
+ $mail->setReplyTo(null);
}
for ($i=0, $count=count($this->usersToImport); $i < $count; $i++) {
diff --git a/plugins/paymethod/manual/ManualPaymentPlugin.inc.php b/plugins/paymethod/manual/ManualPaymentPlugin.inc.php
index 606e6e4..df1334c 100644
--- a/plugins/paymethod/manual/ManualPaymentPlugin.inc.php
+++ b/plugins/paymethod/manual/ManualPaymentPlugin.inc.php
@@ -98,7 +98,7 @@ class ManualPaymentPlugin extends PaymethodPlugin {
$contactName = $journal->getSetting('contactName');
$contactEmail = $journal->getSetting('contactEmail');
$mail = new MailTemplate('MANUAL_PAYMENT_NOTIFICATION');
- $mail->setFrom($contactEmail, $contactName);
+ $mail->setReplyTo(null);
$mail->addRecipient($contactEmail, $contactName);
$mail->assignParams(array(
'journalName' => $journal->getLocalizedTitle(),
diff --git a/plugins/paymethod/paypal/PayPalPlugin.inc.php b/plugins/paymethod/paypal/PayPalPlugin.inc.php
index 2ec6869..09be657 100644
--- a/plugins/paymethod/paypal/PayPalPlugin.inc.php
+++ b/plugins/paymethod/paypal/PayPalPlugin.inc.php
@@ -153,7 +153,7 @@ class PayPalPlugin extends PaymethodPlugin {
$contactName = $journal->getSetting('contactName');
$contactEmail = $journal->getSetting('contactEmail');
$mail = new MailTemplate('PAYPAL_INVESTIGATE_PAYMENT');
- $mail->setFrom($contactEmail, $contactName);
+ $mail->setReplyTo(null);
$mail->addRecipient($contactEmail, $contactName);
$paymentStatus = Request::getUserVar('payment_status');
diff --git a/registry/journalSettings.xml b/registry/journalSettings.xml
index c9caf9b..eb24cb4 100644
--- a/registry/journalSettings.xml
+++ b/registry/journalSettings.xml
@@ -53,6 +53,10 @@
{translate key="default.journalSettings.copyeditInstructions"}
+ emailHeader
+ {translate key="default.journalSettings.emailHeader"}
+
+
emailSignature
{translate key="default.journalSettings.emailSignature"}
diff --git a/templates/editor/notifyUsersEmail.tpl b/templates/editor/notifyUsersEmail.tpl
index 55917ac..b62d4ee 100644
--- a/templates/editor/notifyUsersEmail.tpl
+++ b/templates/editor/notifyUsersEmail.tpl
@@ -1,3 +1,5 @@
+{literal}{$templateHeader}{/literal}
+
{$body}
{$journal->getLocalizedTitle()|strip_tags}
@@ -9,6 +11,7 @@
{if $section.title}{$section.title}{/if}
--------
+{literal}{$templateHeader}{/literal}
{foreach from=$section.articles item=article}
{$article->getLocalizedTitle()|strip_tags}{if $article->getPages()} ({$article->getPages()}){/if}
diff --git a/templates/manager/people/email.tpl b/templates/manager/people/email.tpl
index 7c15c9c..a977fff 100644
--- a/templates/manager/people/email.tpl
+++ b/templates/manager/people/email.tpl
@@ -137,10 +137,6 @@ function deleteAttachment(fileId) {
|
- | {translate key="email.from"} |
- {$from|escape} |
-
-
| {fieldLabel name="subject" key="email.subject"} |
|
diff --git a/templates/manager/setup/step1.tpl b/templates/manager/setup/step1.tpl
index e4672fe..098f9fc 100644
--- a/templates/manager/setup/step1.tpl
+++ b/templates/manager/setup/step1.tpl
@@ -182,6 +182,13 @@
1.4 {translate key="manager.setup.emails"}