Frank Vèssia Posted June 30, 2015 Share Posted June 30, 2015 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? Link to comment Share on other sites More sharing options...
Frank Vèssia Posted July 2, 2015 Author Share Posted July 2, 2015 maybe some hooks? Link to comment Share on other sites More sharing options...
Wanze Posted July 3, 2015 Share Posted July 3, 2015 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. 2 Link to comment Share on other sites More sharing options...
LostKobrakai Posted July 3, 2015 Share Posted July 3, 2015 I'm not using comments, but I would look here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeComments/CommentNotifications.php But it seems they are already using wireMail, so they should be sent by the smtp module. Link to comment Share on other sites More sharing options...
Frank Vèssia Posted July 3, 2015 Author Share Posted July 3, 2015 mmm...yes I can see the module is using wireMail()...so the problem is somewhere else...thanks guys for the tips. Link to comment Share on other sites More sharing options...
Frank Vèssia Posted July 3, 2015 Author Share Posted July 3, 2015 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.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now