Jump to content

Recommended Posts

Posted

I'm running a blog on a Bitnami server which doesn't have email support.
I'm using wireMailSmtp module with Amazon s3 for all the emails sent via Api but what about built in comments?
Email notifications to admin and users don't work...any idea how to allow comments using smtp service?

Posted

Take a look at CommentNotifications::sendAdminNotificationEmail(). This method is hookable. But from my understandings it is already using WireMail which should use wireMailSmtp internally. I've never used a custom email module thought, so I could be wrong.

  • Like 2
Posted

Can be something related to the render function which I'm using for display the comments and the form?
In fact I've noticed differences between the default function

<?php echo $page->comments->renderAll(); ?>

and the "manual" functions with custom parameters that I'm using

<?php 
echo $page->comments->renderForm(array(
       'headline' => "<h3><i class='cki-meatknife'></i> Commenta questa ricetta</h3>",
       'successMessage' => "<div class='alert alert-success'>Grazie per aver commentato la ricetta.</div>",
       'errorMessage' => "<div class='alert alert-danger'>Ci sono stati degli errori, riprova a scrivere il commento</div>",
       'processInput' => true,
       'encoding' => 'UTF-8',
            'attrs' => array(
                   'id' => 'CommentForm',
                   'action' => './',
                   'method' => 'post',
                   'class' => '',
                   'rows' => 4,
                   'cols' => 50,
             ),
             'labels' => array(
                 'cite' => 'Nome',
                 'email' => 'Email',
                 'text' => 'Commento',
                 'submit' => 'Pubblica',
             ),
));

echo $page->comments->render(array(
        'headline' => '<h3>Tutti i commenti</h3>',
        'commentHeader' => '{cite} <small>ha scritto il {created}</small>',
        'dateFormat' => '%d %B %Y alle %H:%I',
        'encoding' => 'UTF-8',
        'useVotes' => 1,
        'admin' => false, // shows unapproved comments if true
));?>

The second method  doesn't display votes for example, and ignore the datetime format set for the field, so "maybe" also skip the notifications? It's like these methods are not using the new comments system...just guessing..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...