caprenter / lamrt

GNU General Public License v3.0
0 stars 0 forks source link

Unable to send email #7

Closed caprenter closed 2 years ago

caprenter commented 2 years ago

@plebster - Unable to send email on the new deployment.

My fault - we have a contact form test that is set to pass if it fails (I know!) because that is what you'd expect on dev. But forgot to pick that up on live - it should have failed against the old live site -but maybe it wasn't..

Anyway, needs some trouble shooting.

caprenter commented 2 years ago

I can see that there have been quite a few spam attempts on the contact page so we might also want to add e.g. https://www.drupal.org/project/honeypot

Plebster commented 2 years ago

there doesn't seem to be an smtp forwarder installed...

https://www.drupal.org/project/smtp

I have had to do this with Wordpress before

Plebster commented 2 years ago

I have got this to work on the test env.

I followed this https://techubber.blogspot.com/2017/11/how-to-resolve-drupal-unable-to-send-emails-smtp-authentication-module.html

I changed the recipient to me and used my smtp creds

We need to to install and get the creds for lamrt.org.uk...

dev -> pre -> live

caprenter commented 2 years ago

Good work. It got me wondering how it was done before,since we never installed that module before.

So,I think our solutions in the past have been to enable sendmail on the server.

I googled this about a 'docker-ish' way to this: https://r.je/sendmail-php-docker

@Plebster I think it's worth you having a look at this alternative solution. I guess it's pros and cons about server set up verses Drupal set up.

I do think whatever we do, we should look at an antispam solution as well btw.

Plebster commented 2 years ago

I think this worked on a 'bodged' box and has become a victim due to a 'clean' install

the alternative solution involves changing the stock drupal image, something we shouldn't really do on live

best practise would be to find a drupal solution (not sure if mine is that solution) also the implementation of a recaptcha would eliminate most of the spam.

Plebster commented 2 years ago

no idea how to place elements...

Screenshot 2022-02-23 at 15 15 59
caprenter commented 2 years ago

I use the honeypot module on BEES - I think it's better/easier

Plebster commented 2 years ago

cool, get some smtp creds and we'll get it installed and pushed to live... I've been staring at form screen for too long :S

caprenter commented 2 years ago

This is working. Closing the issue