OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Need to attach PDF with submission acknowledgement mail

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Need to attach PDF with submission acknowledgement mail

Postby grandpol » Wed Sep 25, 2013 10:49 pm

Dear PKP Team,

Our Journal is using a separate copyright form. So I am planning to send the copyright form as an attachment with the submission acknowledgement e-mail.

How can I attach it with the prepared submission acknowledgement e-mail ?

Thanks ....
Grandi
grandpol
 
Posts: 13
Joined: Wed Sep 25, 2013 10:41 pm

Re: Need to attach PDF with submission acknowledgement mail

Postby asmecher » Thu Sep 26, 2013 8:32 am

Hi Grandi,

Since that email is sent automtically, this will take a code modification. See the SUBMISSION_ACK email send code in classes/author/form/submit/AuthorSubmitStep5Form.inc.php:
Code: Select all
// 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'));
if ($mail->isEnabled()) {
    $mail->addRecipient($user->getEmail(), $user->getFullName());
    // If necessary, BCC the acknowledgement to someone.
    if($journal->getSetting('copySubmissionAckPrimaryContact')) {
        $mail->addBcc(
            $journal->getSetting('contactEmail'),
            $journal->getSetting('contactName')
        );
    }
    if($journal->getSetting('copySubmissionAckSpecified')) {
        $copyAddress = $journal->getSetting('copySubmissionAckAddress');
        if (!empty($copyAddress)) $mail->addBcc($copyAddress);
    }

    // Also BCC automatically assigned section editors
        foreach ($sectionEditors as $sectionEditorEntry) {
        $sectionEditor =& $sectionEditorEntry['user'];
        $mail->addBcc($sectionEditor->getEmail(), $sectionEditor->getFullName());
        unset($sectionEditor);
    }

    $mail->assignParams(array(
        'authorName' => $user->getFullName(),
        'authorUsername' => $user->getUsername(),
        'editorialContactSignature' => $journal->getSetting('contactName') . "\n" . $journal->getLocalizedTitle(),
        'submissionUrl' => $this->request->url(null, 'author', 'submission', $article->getId())
    ));
    $mail->send($this->request);
You'll want to alter this code with an addition to the Mail::addAttachment function, implemented in lib/pkp/classes/mail/Mail.inc.php.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8426
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests