We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 8085 | Differences between
and this patch

Collapse All | Expand All

(-)a/lib/pkp/classes/mail/Mail.inc.php (+35 lines)
 Lines 239-244   class Mail extends DataObject { Link Here 
239
		return $this->getData('from');
239
		return $this->getData('from');
240
	}
240
	}
241
241
242
 	/**
243
	 * Set the reply-to of the message.
244
	 * @param $email string or null to clear
245
	 * @param $name string optional
246
	 */
247
	function setReplyTo($email, $name = '') {
248
		if ($email === null) $this->setData('replyTo', null);
249
		return $this->setData('replyTo', array('name' => $name, 'email' => $email));
250
	}
251
252
	/**
253
	 * Get the reply-to of the message.
254
	 * @return array
255
	 */
256
	function getReplyTo() {
257
		return $this->getData('replyTo');
258
	}
259
260
	/**
261
	 * Return a string containing the reply-to address.
262
	 * @return string
263
	 */
264
	function getReplyToString($send = false) {
265
		$replyTo = $this->getReplyTo();
266
		if ($replyTo == null) {
267
			return null;
268
		} else {
269
			return (Mail::encodeDisplayName($replyTo['name'], $send) . ' <'.$replyTo['email'].'>');
270
		}
271
	}
272
242
	function setSubject($subject) {
273
	function setSubject($subject) {
243
		return $this->setData('subject', $subject);
274
		return $this->setData('subject', $subject);
244
	}
275
	}
 Lines 368-373   class Mail extends DataObject { Link Here 
368
			$this->addHeader('From', $from);
399
			$this->addHeader('From', $from);
369
		}
400
		}
370
401
402
		if (($r = $this->getReplyToString()) != '') {
403
			$this->addHeader('Reply-To', $r);
404
		}
405
371
		$ccs = $this->getAddressArrayString($this->getCcs(), true, true);
406
		$ccs = $this->getAddressArrayString($this->getCcs(), true, true);
372
		if ($ccs != null) {
407
		if ($ccs != null) {
373
			$this->addHeader('Cc', $ccs);
408
			$this->addHeader('Cc', $ccs);
(-)a/lib/pkp/templates/email/email.tpl (-4 lines)
 Lines 144-153   function deleteAttachment(fileId) { Link Here 
144
	<td colspan="2">&nbsp;</td>
144
	<td colspan="2">&nbsp;</td>
145
</tr>
145
</tr>
146
<tr valign="top">
146
<tr valign="top">
147
	<td class="label">{translate key="email.from"}</td>
148
	<td class="value">{$from|escape}</td>
149
</tr>
150
<tr valign="top">
151
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
147
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
152
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="60" maxlength="120" class="textField" /></td>
148
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="60" maxlength="120" class="textField" /></td>
153
</tr>
149
</tr>
(-)a/classes/author/form/submit/AuthorSubmitStep5Form.inc.php (-1 / +1 lines)
 Lines 187-193   class AuthorSubmitStep5Form extends AuthorSubmitForm { Link Here 
187
		// Send author notification email
187
		// Send author notification email
188
		import('classes.mail.ArticleMailTemplate');
188
		import('classes.mail.ArticleMailTemplate');
189
		$mail = new ArticleMailTemplate($article, 'SUBMISSION_ACK', null, null, null, false);
189
		$mail = new ArticleMailTemplate($article, 'SUBMISSION_ACK', null, null, null, false);
190
		$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
190
		$mail->setReplyTo(null);
191
		if ($mail->isEnabled()) {
191
		if ($mail->isEnabled()) {
192
			$mail->addRecipient($user->getEmail(), $user->getFullName());
192
			$mail->addRecipient($user->getEmail(), $user->getFullName());
193
			// If necessary, BCC the acknowledgement to someone.
193
			// If necessary, BCC the acknowledgement to someone.
(-)a/classes/mail/MailTemplate.inc.php (-11 / +20 lines)
 Lines 89-96   class MailTemplate extends PKPMailTemplate { Link Here 
89
		// Default "From" to user if available, otherwise site/journal principal contact
89
		// Default "From" to user if available, otherwise site/journal principal contact
90
		$user =& Request::getUser();
90
		$user =& Request::getUser();
91
		if ($user) {
91
		if ($user) {
92
			$this->setFrom($user->getEmail(), $user->getFullName());
92
			$this->setReplyTo($user->getEmail(), $user->getFullName());
93
		} elseif ($journal == null) {
93
		}
94
		if ($journal == null) {
94
			$site =& Request::getSite();
95
			$site =& Request::getSite();
95
			$this->setFrom($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
96
			$this->setFrom($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
96
97
 Lines 146-161   class MailTemplate extends PKPMailTemplate { Link Here 
146
	 */
147
	 */
147
	function send($clearAttachments = true) {
148
	function send($clearAttachments = true) {
148
		if (isset($this->journal)) {
149
		if (isset($this->journal)) {
149
			//If {$templateSignature} exists in the body of the
150
			//If {$templateSignature} and/or {$templateHeader}
150
			// message, replace it with the journal signature;
151
			// exist in the body of the message, replace them with
151
			// otherwise just append it. This is here to
152
			// the journal signature; otherwise just pre/append
152
			// accomodate MIME-encoded messages or other cases
153
			// them. This is here to accomodate MIME-encoded
153
			// where the signature cannot just be appended.
154
			// messages or other cases where the signature cannot
154
			$searchString = '{$templateSignature}';
155
			// just be appended.
155
			if (strstr($this->getBody(), $searchString) === false) {
156
			$header = $this->journal->getSetting('emailHeader');
156
				$this->setBody($this->getBody() . "\n" . $this->journal->getSetting('emailSignature'));
157
			if (strstr($this->getBody(), '{$templateHeader}') === false) {
158
				$this->setBody($header . "\n" . $this->getBody());
159
			} else {
160
				$this->setBody(str_replace('{$templateHeader}', $header, $this->getBody()));
161
			}
162
163
			$signature = $this->journal->getSetting('emailSignature');
164
			if (strstr($this->getBody(), '{$templateSignature}') === false) {
165
				$this->setBody($this->getBody() . "\n" . $signature);
157
			} else {
166
			} else {
158
				$this->setBody(str_replace($searchString, $this->journal->getSetting('emailSignature'), $this->getBody()));
167
				$this->setBody(str_replace('{$templateSignature}', $signature, $this->getBody()));
159
			}
168
			}
160
169
161
			$envelopeSender = $this->journal->getSetting('envelopeSender');
170
			$envelopeSender = $this->journal->getSetting('envelopeSender');
(-)a/classes/manager/form/UserManagementForm.inc.php (-1 / +1 lines)
 Lines 356-362   class UserManagementForm extends Form { Link Here 
356
				// Send welcome email to user
356
				// Send welcome email to user
357
				import('classes.mail.MailTemplate');
357
				import('classes.mail.MailTemplate');
358
				$mail = new MailTemplate('USER_REGISTER');
358
				$mail = new MailTemplate('USER_REGISTER');
359
				$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
359
				$mail->setReplyTo(null);
360
				$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
360
				$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
361
				$mail->addRecipient($user->getEmail(), $user->getFullName());
361
				$mail->addRecipient($user->getEmail(), $user->getFullName());
362
				$mail->send();
362
				$mail->send();
(-)a/classes/manager/form/setup/JournalSetupStep1Form.inc.php (+1 lines)
 Lines 54-59   class JournalSetupStep1Form extends JournalSetupForm { Link Here 
54
				'contributors' => 'object',
54
				'contributors' => 'object',
55
				'history' => 'string',
55
				'history' => 'string',
56
				'envelopeSender' => 'string',
56
				'envelopeSender' => 'string',
57
				'emailHeader' => 'string',
57
				'emailSignature' => 'string',
58
				'emailSignature' => 'string',
58
				'searchDescription' => 'string',
59
				'searchDescription' => 'string',
59
				'searchKeywords' => 'string',
60
				'searchKeywords' => 'string',
(-)a/classes/sectionEditor/form/CreateReviewerForm.inc.php (-1 / +1 lines)
 Lines 196-202   class CreateReviewerForm extends Form { Link Here 
196
			// Send welcome email to user
196
			// Send welcome email to user
197
			import('classes.mail.MailTemplate');
197
			import('classes.mail.MailTemplate');
198
			$mail = new MailTemplate('REVIEWER_REGISTER');
198
			$mail = new MailTemplate('REVIEWER_REGISTER');
199
			$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
199
			$mail->setReplyTo(null);
200
			$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
200
			$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
201
			$mail->addRecipient($user->getEmail(), $user->getFullName());
201
			$mail->addRecipient($user->getEmail(), $user->getFullName());
202
			$mail->send();
202
			$mail->send();
(-)a/classes/submission/form/comment/CommentForm.inc.php (-1 / +1 lines)
 Lines 132-138   class CommentForm extends Form { Link Here 
132
132
133
		import('classes.mail.ArticleMailTemplate');
133
		import('classes.mail.ArticleMailTemplate');
134
		$email = new ArticleMailTemplate($article, 'SUBMISSION_COMMENT');
134
		$email = new ArticleMailTemplate($article, 'SUBMISSION_COMMENT');
135
		$email->setFrom($this->user->getEmail(), $this->user->getFullName());
135
		$email->setReplyTo($this->user->getEmail(), $this->user->getFullName());
136
136
137
		$commentText = $this->getData('comments');
137
		$commentText = $this->getData('comments');
138
138
(-)a/classes/submission/form/comment/EditCommentForm.inc.php (-1 / +1 lines)
 Lines 294-300   class EditCommentForm extends Form { Link Here 
294
		import('classes.mail.ArticleMailTemplate');
294
		import('classes.mail.ArticleMailTemplate');
295
		$email = new ArticleMailTemplate($this->article, 'SUBMISSION_COMMENT');
295
		$email = new ArticleMailTemplate($this->article, 'SUBMISSION_COMMENT');
296
		$journal =& Request::getJournal();
296
		$journal =& Request::getJournal();
297
		if ($journal) $email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
297
		if ($journal) $email->setReplyTo($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
298
298
299
		foreach ($recipients as $emailAddress => $name) {
299
		foreach ($recipients as $emailAddress => $name) {
300
			$email->addRecipient($emailAddress, $name);
300
			$email->addRecipient($emailAddress, $name);
(-)a/classes/submission/reviewer/ReviewerAction.inc.php (-2 / +2 lines)
 Lines 54-60   class ReviewerAction extends Action { Link Here 
54
			$email = new ArticleMailTemplate($reviewerSubmission, $decline?'REVIEW_DECLINE':'REVIEW_CONFIRM');
54
			$email = new ArticleMailTemplate($reviewerSubmission, $decline?'REVIEW_DECLINE':'REVIEW_CONFIRM');
55
			// Must explicitly set sender because we may be here on an access
55
			// Must explicitly set sender because we may be here on an access
56
			// key, in which case the user is not technically logged in
56
			// key, in which case the user is not technically logged in
57
			$email->setFrom($reviewer->getEmail(), $reviewer->getFullName());
57
			$email->setReplyTo($reviewer->getEmail(), $reviewer->getFullName());
58
			if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
58
			if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
59
				HookRegistry::call('ReviewerAction::confirmReview', array(&$reviewerSubmission, &$email, $decline));
59
				HookRegistry::call('ReviewerAction::confirmReview', array(&$reviewerSubmission, &$email, $decline));
60
				if ($email->isEnabled()) {
60
				if ($email->isEnabled()) {
 Lines 148-154   class ReviewerAction extends Action { Link Here 
148
			$email = new ArticleMailTemplate($reviewerSubmission, 'REVIEW_COMPLETE');
148
			$email = new ArticleMailTemplate($reviewerSubmission, 'REVIEW_COMPLETE');
149
			// Must explicitly set sender because we may be here on an access
149
			// Must explicitly set sender because we may be here on an access
150
			// key, in which case the user is not technically logged in
150
			// key, in which case the user is not technically logged in
151
			$email->setFrom($reviewer->getEmail(), $reviewer->getFullName());
151
			$email->setReplyTo($reviewer->getEmail(), $reviewer->getFullName());
152
152
153
			if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
153
			if (!$email->isEnabled() || ($send && !$email->hasErrors())) {
154
				HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
154
				HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
(-)a/classes/subscription/SubscriptionAction.inc.php (-1 / +1 lines)
 Lines 645-651   class SubscriptionAction { Link Here 
645
645
646
		import('classes.mail.MailTemplate');
646
		import('classes.mail.MailTemplate');
647
		$mail = new MailTemplate($mailTemplateKey);
647
		$mail = new MailTemplate($mailTemplateKey);
648
		$mail->setFrom($subscriptionContactEmail, $subscriptionContactName);
648
		$mail->setReplyTo($subscriptionContactEmail, $subscriptionContactName);
649
		$mail->addRecipient($subscriptionContactEmail, $subscriptionContactName);
649
		$mail->addRecipient($subscriptionContactEmail, $subscriptionContactName);
650
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
650
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
651
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
651
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
(-)a/classes/subscription/form/SubscriptionForm.inc.php (-1 / +1 lines)
 Lines 300-306   class SubscriptionForm extends Form { Link Here 
300
300
301
		import('classes.mail.MailTemplate');
301
		import('classes.mail.MailTemplate');
302
		$mail = new MailTemplate($mailTemplateKey);
302
		$mail = new MailTemplate($mailTemplateKey);
303
		$mail->setFrom($subscriptionEmail, $subscriptionName);
303
		$mail->setReplyTo($subscriptionEmail, $subscriptionName);
304
		$mail->addRecipient($user->getEmail(), $user->getFullName());
304
		$mail->addRecipient($user->getEmail(), $user->getFullName());
305
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
305
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
306
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
306
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
(-)a/classes/tasks/OpenAccessNotification.inc.php (-1 / +1 lines)
 Lines 37-43   class OpenAccessNotification extends ScheduledTask { Link Here 
37
			$email = new MailTemplate('OPEN_ACCESS_NOTIFY', $journal->getPrimaryLocale());
37
			$email = new MailTemplate('OPEN_ACCESS_NOTIFY', $journal->getPrimaryLocale());
38
38
39
			$email->setSubject($email->getSubject($journal->getPrimaryLocale()));
39
			$email->setSubject($email->getSubject($journal->getPrimaryLocale()));
40
			$email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
40
			$email->setReplyTo(null);
41
			$email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
41
			$email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
42
42
43
			$paramArray = array(
43
			$paramArray = array(
(-)a/classes/tasks/ReviewReminder.inc.php (-1 / +1 lines)
 Lines 40-46   class ReviewReminder extends ScheduledTask { Link Here 
40
40
41
		$email = new ArticleMailTemplate($article, $reviewerAccessKeysEnabled?'REVIEW_REMIND_AUTO_ONECLICK':'REVIEW_REMIND_AUTO', $journal->getPrimaryLocale(), false, $journal);
41
		$email = new ArticleMailTemplate($article, $reviewerAccessKeysEnabled?'REVIEW_REMIND_AUTO_ONECLICK':'REVIEW_REMIND_AUTO', $journal->getPrimaryLocale(), false, $journal);
42
		$email->setJournal($journal);
42
		$email->setJournal($journal);
43
		$email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
43
		$email->setReplyTo(null);
44
		$email->addRecipient($reviewer->getEmail(), $reviewer->getFullName());
44
		$email->addRecipient($reviewer->getEmail(), $reviewer->getFullName());
45
		$email->setAssoc(ARTICLE_EMAIL_REVIEW_REMIND, ARTICLE_EMAIL_TYPE_REVIEW, $reviewId);
45
		$email->setAssoc(ARTICLE_EMAIL_REVIEW_REMIND, ARTICLE_EMAIL_TYPE_REVIEW, $reviewId);
46
46
(-)a/classes/tasks/SubscriptionExpiryReminder.inc.php (-1 / +1 lines)
 Lines 71-77   class SubscriptionExpiryReminder extends ScheduledTask { Link Here 
71
71
72
		import('classes.mail.MailTemplate');
72
		import('classes.mail.MailTemplate');
73
		$mail = new MailTemplate($emailKey, $journal->getPrimaryLocale());
73
		$mail = new MailTemplate($emailKey, $journal->getPrimaryLocale());
74
		$mail->setFrom($subscriptionEmail, $subscriptionName);
74
		$mail->setReplyTo($subscriptionEmail, $subscriptionName);
75
		$mail->addRecipient($user->getEmail(), $user->getFullName());
75
		$mail->addRecipient($user->getEmail(), $user->getFullName());
76
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
76
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
77
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
77
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
(-)a/classes/user/form/RegistrationForm.inc.php (-2 / +2 lines)
 Lines 307-313   class RegistrationForm extends Form { Link Here 
307
307
308
				// Send email validation request to user
308
				// Send email validation request to user
309
				$mail = new MailTemplate('USER_VALIDATE');
309
				$mail = new MailTemplate('USER_VALIDATE');
310
				$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
310
				$mail->setReplyTo(null);
311
				$mail->assignParams(array(
311
				$mail->assignParams(array(
312
					'userFullName' => $user->getFullName(),
312
					'userFullName' => $user->getFullName(),
313
					'activateUrl' => Request::url($journal->getPath(), 'user', 'activateUser', array($this->getData('username'), $accessKey))
313
					'activateUrl' => Request::url($journal->getPath(), 'user', 'activateUser', array($this->getData('username'), $accessKey))
 Lines 319-325   class RegistrationForm extends Form { Link Here 
319
			if ($this->getData('sendPassword')) {
319
			if ($this->getData('sendPassword')) {
320
				// Send welcome email to user
320
				// Send welcome email to user
321
				$mail = new MailTemplate('USER_REGISTER');
321
				$mail = new MailTemplate('USER_REGISTER');
322
				$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
322
				$mail->setReplyTo(null);
323
				$mail->assignParams(array(
323
				$mail->assignParams(array(
324
					'username' => $this->getData('username'),
324
					'username' => $this->getData('username'),
325
					'password' => String::substr($this->getData('password'), 0, 30), // Prevent mailer abuse via long passwords
325
					'password' => String::substr($this->getData('password'), 0, 30), // Prevent mailer abuse via long passwords
(-)a/locale/en_US/default.xml (+2 lines)
 Lines 131-136   Please follow the following protocol for making electronic revisions to your man Link Here 
131
	<pre>4. FORMATTING
131
	<pre>4. FORMATTING
132
	The paragraph that begins "This last topic..." is not indented.</pre>]]></message>
132
	The paragraph that begins "This last topic..." is not indented.</pre>]]></message>
133
	
133
	
134
	<message key="default.journalSettings.emailHeader">The following message is being delivered on behalf of {$journalName}.
135
________________________________________________________________________</message>
134
	<message key="default.journalSettings.emailSignature">________________________________________________________________________
136
	<message key="default.journalSettings.emailSignature">________________________________________________________________________
135
{$journalName}
137
{$journalName}
136
{$indexUrl}/{$journalPath}</message>
138
{$indexUrl}/{$journalPath}</message>
(-)a/locale/en_US/manager.xml (+2 lines)
 Lines 260-265    Link Here 
260
	<message key="manager.setup.emailBounceAddressDescription">Any undeliverable emails will result in an error message to this address.</message>
260
	<message key="manager.setup.emailBounceAddressDescription">Any undeliverable emails will result in an error message to this address.</message>
261
	<message key="manager.setup.emailBounceAddressDisabled"><![CDATA[<strong>Note:</strong> To activate this option, the site administrator must enable the <tt>allow_envelope_sender</tt> 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.]]></message>
261
	<message key="manager.setup.emailBounceAddressDisabled"><![CDATA[<strong>Note:</strong> To activate this option, the site administrator must enable the <tt>allow_envelope_sender</tt> 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.]]></message>
262
	<message key="manager.setup.emails">Email Identification</message>
262
	<message key="manager.setup.emails">Email Identification</message>
263
	<message key="manager.setup.emailHeader">Email Header</message>
264
	<message key="manager.setup.emailHeaderDescription">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.</message>
263
	<message key="manager.setup.emailSignature">Signature</message>
265
	<message key="manager.setup.emailSignature">Signature</message>
264
	<message key="manager.setup.emailSignatureDescription">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.</message>
266
	<message key="manager.setup.emailSignatureDescription">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.</message>
265
	<message key="manager.setup.enableAnnouncements">Enable Journal Managers to add journal announcements.</message>
267
	<message key="manager.setup.enableAnnouncements">Enable Journal Managers to add journal announcements.</message>
(-)a/pages/login/LoginHandler.inc.php (-2 / +2 lines)
 Lines 95-103   class LoginHandler extends PKPLoginHandler { Link Here 
95
		
95
		
96
		// Set the sender based on the current context
96
		// Set the sender based on the current context
97
		if ($journal && $journal->getSetting('supportEmail')) {
97
		if ($journal && $journal->getSetting('supportEmail')) {
98
			$mail->setFrom($journal->getSetting('supportEmail'), $journal->getSetting('supportName'));
98
			$mail->setReplyTo($journal->getSetting('supportEmail'), $journal->getSetting('supportName'));
99
		} else { 
99
		} else { 
100
			$mail->setFrom($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
100
			$mail->setReplyTo($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
101
		}
101
		}
102
	}
102
	}
103
103
(-)a/plugins/generic/booksForReview/classes/BooksForReviewReminder.inc.php (-1 / +1 lines)
 Lines 40-46   class BooksForReviewReminder extends ScheduledTask { Link Here 
40
		import('classes.mail.MailTemplate');
40
		import('classes.mail.MailTemplate');
41
		$mail = new MailTemplate($emailKey);
41
		$mail = new MailTemplate($emailKey);
42
42
43
		$mail->setFrom($book->getEditorEmail(), $book->getEditorFullName());
43
		$mail->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
44
		$mail->addRecipient($book->getUserEmail(), $book->getUserFullName());
44
		$mail->addRecipient($book->getUserEmail(), $book->getUserFullName());
45
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
45
		$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
46
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
46
		$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
(-)a/plugins/generic/booksForReview/pages/BooksForReviewAuthorHandler.inc.php (-4 lines)
 Lines 124-132   class BooksForReviewAuthorHandler extends Handler { Link Here 
124
						$user =& $request->getUser();
124
						$user =& $request->getUser();
125
						$userId = $user->getId();
125
						$userId = $user->getId();
126
126
127
						$userFullName = $user->getFullName();
128
						$userEmail = $user->getEmail();
129
130
						$editorFullName = $book->getEditorFullName();
127
						$editorFullName = $book->getEditorFullName();
131
						$editorEmail = $book->getEditorEmail();
128
						$editorEmail = $book->getEditorEmail();
132
129
 Lines 137-143   class BooksForReviewAuthorHandler extends Handler { Link Here 
137
						);
134
						);
138
135
139
						$email->addRecipient($editorEmail, $editorFullName);
136
						$email->addRecipient($editorEmail, $editorFullName);
140
						$email->setFrom($userEmail, $userFullName);
141
						$email->assignParams($paramArray);
137
						$email->assignParams($paramArray);
142
					}
138
					}
143
					$returnUrl = $request->url(null, 'author', 'requestBookForReview', $bookId);
139
					$returnUrl = $request->url(null, 'author', 'requestBookForReview', $bookId);
(-)a/plugins/generic/booksForReview/pages/BooksForReviewEditorHandler.inc.php (-4 / +4 lines)
 Lines 662-668   class BooksForReviewEditorHandler extends Handler { Link Here 
662
						);
662
						);
663
663
664
						$email->addRecipient($userEmail, $userName);
664
						$email->addRecipient($userEmail, $userName);
665
						$email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
665
						$email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
666
						$email->assignParams($paramArray);
666
						$email->assignParams($paramArray);
667
					}
667
					}
668
					$returnUrl = $request->url(null, 'editor', 'assignBookForReviewAuthor', $bookId, array('returnPage' => $returnPage, 'userId' => $userId));
668
					$returnUrl = $request->url(null, 'editor', 'assignBookForReviewAuthor', $bookId, array('returnPage' => $returnPage, 'userId' => $userId));
 Lines 737-743   class BooksForReviewEditorHandler extends Handler { Link Here 
737
					);
737
					);
738
738
739
					$email->addRecipient($userEmail, $userFullName);
739
					$email->addRecipient($userEmail, $userFullName);
740
					$email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
740
					$email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
741
					$email->assignParams($paramArray);
741
					$email->assignParams($paramArray);
742
				}
742
				}
743
				$returnUrl = $request->url(null, 'editor', 'denyBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
743
				$returnUrl = $request->url(null, 'editor', 'denyBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
 Lines 823-829   class BooksForReviewEditorHandler extends Handler { Link Here 
823
					);
823
					);
824
824
825
					$email->addRecipient($userEmail, $userFullName);
825
					$email->addRecipient($userEmail, $userFullName);
826
					$email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
826
					$email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
827
					$email->assignParams($paramArray);
827
					$email->assignParams($paramArray);
828
				}
828
				}
829
				$returnUrl = $request->url(null, 'editor', 'notifyBookForReviewMailed', $bookId, array('returnPage' => $returnPage));
829
				$returnUrl = $request->url(null, 'editor', 'notifyBookForReviewMailed', $bookId, array('returnPage' => $returnPage));
 Lines 902-908   class BooksForReviewEditorHandler extends Handler { Link Here 
902
					);
902
					);
903
903
904
					$email->addRecipient($userEmail, $userFullName);
904
					$email->addRecipient($userEmail, $userFullName);
905
					$email->setFrom($book->getEditorEmail(), $book->getEditorFullName());
905
					$email->setReplyTo($book->getEditorEmail(), $book->getEditorFullName());
906
					$email->assignParams($paramArray);
906
					$email->assignParams($paramArray);
907
				}
907
				}
908
				$returnUrl = $request->url(null, 'editor', 'removeBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
908
				$returnUrl = $request->url(null, 'editor', 'removeBookForReviewAuthor', $bookId, array('returnPage' => $returnPage));
(-)a/plugins/generic/sword/SwordPlugin.inc.php (-3 / +1 lines)
 Lines 151-160   class SwordPlugin extends GenericPlugin { Link Here 
151
			$submittingUser =& $sectionEditorSubmission->getUser();
151
			$submittingUser =& $sectionEditorSubmission->getUser();
152
152
153
			import('classes.mail.ArticleMailTemplate');
153
			import('classes.mail.ArticleMailTemplate');
154
			$contactName = $journal->getSetting('contactName');
155
			$contactEmail = $journal->getSetting('contactEmail');
156
			$mail = new ArticleMailTemplate($sectionEditorSubmission, 'SWORD_DEPOSIT_NOTIFICATION', null, null, $journal, true, true);
154
			$mail = new ArticleMailTemplate($sectionEditorSubmission, 'SWORD_DEPOSIT_NOTIFICATION', null, null, $journal, true, true);
157
			$mail->setFrom($contactEmail, $contactName);
155
			$mail->setReplyTo(null);
158
			$mail->addRecipient($submittingUser->getEmail(), $submittingUser->getFullName());
156
			$mail->addRecipient($submittingUser->getEmail(), $submittingUser->getFullName());
159
157
160
			$mail->assignParams(array(
158
			$mail->assignParams(array(
(-)a/plugins/generic/thesis/StudentThesisForm.inc.php (-3 / +3 lines)
 Lines 288-297   class StudentThesisForm extends Form { Link Here 
288
288
289
			import('classes.mail.MailTemplate');
289
			import('classes.mail.MailTemplate');
290
			$mail = new MailTemplate('THESIS_ABSTRACT_CONFIRM');
290
			$mail = new MailTemplate('THESIS_ABSTRACT_CONFIRM');
291
			$mail->setFrom($thesisEmail, "\"" . $thesisName . "\"");
291
			$mail->setReplyTo($thesisEmail, $thesisName);
292
			$mail->assignParams($paramArray);
292
			$mail->assignParams($paramArray);
293
			$mail->addRecipient($thesis->getSupervisorEmail(), "\"" . $supervisorName . "\"");
293
			$mail->addRecipient($thesis->getSupervisorEmail(), $supervisorName);
294
			$mail->addCc($thesis->getStudentEmail(), "\"" . $studentName . "\"");
294
			$mail->addCc($thesis->getStudentEmail(), $studentName);
295
			$mail->send();
295
			$mail->send();
296
		}
296
		}
297
297
(-)a/plugins/importexport/users/UserXMLParser.inc.php (-1 / +1 lines)
 Lines 195-201   class UserXMLParser { Link Here 
195
195
196
			$journalDao =& DAORegistry::getDAO('JournalDAO');
196
			$journalDao =& DAORegistry::getDAO('JournalDAO');
197
			$journal =& $journalDao->getJournal($this->journalId);
197
			$journal =& $journalDao->getJournal($this->journalId);
198
			$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
198
			$mail->setReplyTo(null);
199
		}
199
		}
200
200
201
		for ($i=0, $count=count($this->usersToImport); $i < $count; $i++) {
201
		for ($i=0, $count=count($this->usersToImport); $i < $count; $i++) {
(-)a/plugins/paymethod/manual/ManualPaymentPlugin.inc.php (-1 / +1 lines)
 Lines 98-104   class ManualPaymentPlugin extends PaymethodPlugin { Link Here 
98
				$contactName = $journal->getSetting('contactName');
98
				$contactName = $journal->getSetting('contactName');
99
				$contactEmail = $journal->getSetting('contactEmail');
99
				$contactEmail = $journal->getSetting('contactEmail');
100
				$mail = new MailTemplate('MANUAL_PAYMENT_NOTIFICATION');
100
				$mail = new MailTemplate('MANUAL_PAYMENT_NOTIFICATION');
101
				$mail->setFrom($contactEmail, $contactName);
101
				$mail->setReplyTo(null);
102
				$mail->addRecipient($contactEmail, $contactName);
102
				$mail->addRecipient($contactEmail, $contactName);
103
				$mail->assignParams(array(
103
				$mail->assignParams(array(
104
					'journalName' => $journal->getLocalizedTitle(),
104
					'journalName' => $journal->getLocalizedTitle(),
(-)a/plugins/paymethod/paypal/PayPalPlugin.inc.php (-1 / +1 lines)
 Lines 153-159   class PayPalPlugin extends PaymethodPlugin { Link Here 
153
		$contactName = $journal->getSetting('contactName');
153
		$contactName = $journal->getSetting('contactName');
154
		$contactEmail = $journal->getSetting('contactEmail');
154
		$contactEmail = $journal->getSetting('contactEmail');
155
		$mail = new MailTemplate('PAYPAL_INVESTIGATE_PAYMENT');
155
		$mail = new MailTemplate('PAYPAL_INVESTIGATE_PAYMENT');
156
		$mail->setFrom($contactEmail, $contactName);
156
		$mail->setReplyTo(null);
157
		$mail->addRecipient($contactEmail, $contactName);
157
		$mail->addRecipient($contactEmail, $contactName);
158
158
159
		$paymentStatus = Request::getUserVar('payment_status');
159
		$paymentStatus = Request::getUserVar('payment_status');
(-)a/registry/journalSettings.xml (+4 lines)
 Lines 53-58    Link Here 
53
		<value>{translate key="default.journalSettings.copyeditInstructions"}</value>
53
		<value>{translate key="default.journalSettings.copyeditInstructions"}</value>
54
	</setting>
54
	</setting>
55
	<setting type="string" locale="0">
55
	<setting type="string" locale="0">
56
		<name>emailHeader</name>
57
		<value>{translate key="default.journalSettings.emailHeader"}</value>
58
	</setting>
59
	<setting type="string" locale="0">
56
		<name>emailSignature</name>
60
		<name>emailSignature</name>
57
		<value>{translate key="default.journalSettings.emailSignature"}</value>
61
		<value>{translate key="default.journalSettings.emailSignature"}</value>
58
	</setting>
62
	</setting>
(-)a/templates/editor/notifyUsersEmail.tpl (+3 lines)
 Lines 1-3    Link Here 
1
{literal}{$templateHeader}{/literal}
2
1
{$body}
3
{$body}
2
4
3
{$journal->getLocalizedTitle()|strip_tags}
5
{$journal->getLocalizedTitle()|strip_tags}
 Lines 9-14    Link Here 
9
{if $section.title}{$section.title}{/if}
11
{if $section.title}{$section.title}{/if}
10
12
11
--------
13
--------
14
{literal}{$templateHeader}{/literal}
12
{foreach from=$section.articles item=article}
15
{foreach from=$section.articles item=article}
13
{$article->getLocalizedTitle()|strip_tags}{if $article->getPages()} ({$article->getPages()}){/if}
16
{$article->getLocalizedTitle()|strip_tags}{if $article->getPages()} ({$article->getPages()}){/if}
14
17
(-)a/templates/manager/people/email.tpl (-4 lines)
 Lines 137-146   function deleteAttachment(fileId) { Link Here 
137
	<td colspan="2">&nbsp;</td>
137
	<td colspan="2">&nbsp;</td>
138
</tr>
138
</tr>
139
<tr valign="top">
139
<tr valign="top">
140
	<td class="label">{translate key="email.from"}</td>
141
	<td class="value">{$from|escape}</td>
142
</tr>
143
<tr valign="top">
144
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
140
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
145
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="60" maxlength="120" class="textField" /></td>
141
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="60" maxlength="120" class="textField" /></td>
146
</tr>
142
</tr>
(-)a/templates/manager/setup/step1.tpl (+7 lines)
 Lines 182-187    Link Here 
182
<div id="setupEmails">
182
<div id="setupEmails">
183
<h3>1.4 {translate key="manager.setup.emails"}</h3>
183
<h3>1.4 {translate key="manager.setup.emails"}</h3>
184
<table width="100%" class="data">
184
<table width="100%" class="data">
185
	<tr valign="top"><td colspan="2">{translate key="manager.setup.emailHeaderDescription"}<br />&nbsp;</td></tr>
186
	<tr valign="top">
187
		<td class="label">{fieldLabel name="emailHeader" key="manager.setup.emailHeader"}</td>
188
		<td class="value">
189
			<textarea name="emailHeader" id="emailHeader" rows="3" cols="60" class="textArea">{$emailHeader|escape}</textarea>
190
		</td>
191
	</tr>
185
	<tr valign="top"><td colspan="2">{translate key="manager.setup.emailSignatureDescription"}<br />&nbsp;</td></tr>
192
	<tr valign="top"><td colspan="2">{translate key="manager.setup.emailSignatureDescription"}<br />&nbsp;</td></tr>
186
	<tr valign="top">
193
	<tr valign="top">
187
		<td class="label">{fieldLabel name="emailSignature" key="manager.setup.emailSignature"}</td>
194
		<td class="label">{fieldLabel name="emailSignature" key="manager.setup.emailSignature"}</td>
(-)a/templates/rt/email.tpl (-4 lines)
 Lines 146-155   function deleteAttachment(fileId) { Link Here 
146
	<td colspan="2">&nbsp;</td>
146
	<td colspan="2">&nbsp;</td>
147
</tr>
147
</tr>
148
<tr valign="top">
148
<tr valign="top">
149
	<td class="label">{translate key="email.from"}</td>
150
	<td class="value">{$from|escape}</td>
151
</tr>
152
<tr valign="top">
153
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
149
	<td width="20%" class="label">{fieldLabel name="subject" key="email.subject"}</td>
154
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="50" maxlength="120" class="textField" /></td>
150
	<td width="80%" class="value"><input type="text" id="subject" name="subject" value="{$subject|escape}" size="50" maxlength="120" class="textField" /></td>
155
</tr>
151
</tr>
(-)a/templates/subscription/openAccessNotifyEmail.tpl (+3 lines)
 Lines 4-9    Link Here 
4
Content-Type: text/plain; charset={$defaultCharset|escape}
4
Content-Type: text/plain; charset={$defaultCharset|escape}
5
Content-Transfer-Encoding: quoted-printable
5
Content-Transfer-Encoding: quoted-printable
6
6
7
{literal}{$templateHeader}{/literal}
7
{$body}
8
{$body}
8
9
9
{$issue->getIssueIdentification()}
10
{$issue->getIssueIdentification()}
 Lines 42-47   Content-Transfer-Encoding: quoted-printable Link Here 
42
		</head>
43
		</head>
43
	<body>
44
	<body>
44
45
46
	<pre>{literal}{$templateHeader}{/literal}</pre>
47
45
	<p>{$body|escape|nl2br}</p>
48
	<p>{$body|escape|nl2br}</p>
46
49
47
		<h3>{$issue->getIssueIdentification()}<br />{translate key="issue.toc"}</h3>
50
		<h3>{$issue->getIssueIdentification()}<br />{translate key="issue.toc"}</h3>

Return to bug 8085