Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Vokuro can't load Mail template


i have a problem with Vokuro Mail.php. The emails were send, but the content is always empty.

The getTemplate functition can't load the confirmation.volt.

    public function getTemplate($name, $params)
        $parameters = array_merge([
            'publicUrl' => $this->config->application->publicUrl
        ], $params);
        return $this->view->getRender('emailTemplates', $name, $parameters, function ($view) {
        return $view->getContent();
     * Sends e-mails via AmazonSES based on predefined templates
     * @param array $to
     * @param string $subject
     * @param string $name
     * @param array $params
     * @return bool|int
     * @throws Exception
    public function send($to, $subject, $name, $params)
        // Settings
        $mailSettings = $this->config->mail;
        $template = $this->getTemplate($name, $params);
        // Create the message
        $message = Message::newInstance()
                $mailSettings->fromEmail => $mailSettings->fromName
            ->setBody($template, 'text/html');
        if (isset($mailSettings) && isset($mailSettings->smtp)) {
            if (!$this->transport) {
                $this->transport = Smtp::newInstance(
            // Create the Mailer using your created Transport
            $mailer = \Swift_Mailer::newInstance($this->transport);
            return $mailer->send($message);
        } else {
            return $this->amazonSESSend($message->toString());

When i do this in send function, it works:

$template = '<tbody>
    <td style="padding:40px 0  0 0;">
        <p style="color:#000;font-size: 16px;line-height:24px;font-family:\'HelveticaNeue\',\'Helvetica Neue\',Helvetica,Arial,sans-serif;font-weight:normal;">

            <h2 style="font-size: 14px;font-family:\'HelveticaNeue\',\'Helvetica Neue\',Helvetica,Arial,sans-serif;">
                You\'re Almost There! Just Confirm Your Email

            <p style="font-size: 13px;line-height:24px;font-family:\'HelveticaNeue\',\'Helvetica Neue\',Helvetica,Arial,sans-serif;">
                You\'ve successfully created a  account. To activate it, please click below to verify your email address.
                <a style="background:#E86537;color:#fff;padding:10px" href="http://{{ publicUrl }}{{ confirmUrl }}">Confirm</a>



edited Jun '17

If anybody is interested, i found a way:

 public function getTemplate($name, $params)

    $parameters = array_merge([
        'publicUrl' => $this->config->application->publicUrl
    ], $params);
    $this->view->getRender('emailTemplates', $name, $parameters);

    return $this->view->getContent();