getgrav / grav-plugin-email

Grav Email Plugin
http://getgrav.org
MIT License
37 stars 29 forks source link

e-mail not send. #53

Closed andyberkoff closed 6 years ago

andyberkoff commented 7 years ago

Hey. I'm new to GRAV. I have a problem. Do not send letters from the site. I use the contact form. Palgin set up as specified in the documentation. I checked the sending of mail from the server where the site is hosted - everything is sent. I check the plugin using CLI: bin / plugin email test-email -t andy_matveev@mail.ru I receive an output in the console:

Current Configuration:

array:8 [
  "enabled" => true
  "from" => "andy_matveev@mail.ru"
  "from_name" => null
  "to" => "andy_matveev@mail.ru"
  "to_name" => null
  "mailer" => array:3 [
    "engine" => "mail"
    "smtp" => array:5 [
      "server" => "localhost"
      "port" => 25
      "encryption" => "none"
      "user" => ""
      "password" => ""
    ]
    "sendmail" => array:1 [
      "bin" => "/usr/sbin/sendmail"
    ]
  ]
  "content_type" => "text/html"
  "debug" => false
]

Message sent successfully!

The message is saved in the user / data / my-niceform folder But it does not come to my mailbox! If I send a message, use the server's command line sendmail -v andy_matveev@mail.ru Then a message appears in my mailbox. Thus, using the contact form, I can not send a message. The same happens if I use a form to render a message with an attached file. The file is not attached and the message is not sent. Here is the file with the form:

title: Связь
action: '@self'
cache_enable: false
form:
    name: my-nice-form
    fields:
        -
            name: name
            label: Имя
            placeholder: 'ваше имя'
            autofocus: 'on'
            autocomplete: 'on'
            type: text
            validate:
                required: true
        -
            name: email
            label: Е-майл
            placeholder: 'ваш е-майл'
            type: text
            validate:
                rule: email
                required: true
        -
            name: phone
            label: Телефон
            placeholder: 'Номер телефона'
            type: text
            validate:
                required: true
        -
            name: message
            label: Сообщение
            size: long
            placeholder: сообщение
            type: textarea
            validate:
                required: true
        -
            name: my-file
            label: 'Добавить файл'
            type: file
            multiple: true
            description: 'Перетащите файлы сюда'
            destination: 'user/data'
    buttons:
        -
            type: submit
            value: Submit
            classes: btn
        -
            type: reset
            value: Reset
            classes: btn
    process:
        -   email:
                from: "{{ form.value.email|e }}"
                to: "{{ config.plugins.email.to }}"
                subject: "Contact by {{ form.value.name|e }}"
                body: "{% include 'forms/data.html.twig' %}"
                attachments: 'my-file'
        -   save:
                fileprefix: feedback-
                dateformat: Ymd-His-u
                extension: txt
                body: '{% include ''forms/data.txt.twig'' %} {{ config.plugins.email.from }} {{ config.plugins.email.my-file }}'
        -   message: 'Thank you for your feedback!'
        -   display: thankyou
    reset: true
flaviocopes commented 7 years ago

Most probably the spam filters are catching your message, as sending emails from localhost usually ends up with this problem.

Check https://github.com/getgrav/grav-plugin-email#emails-are-not-sent

andyberkoff commented 7 years ago

I wonder .... but why then if I do not make changes to the plugin configuration file, i.e. I do not set it up, I fill out the form and press send, a letter comes to me. (The address to send to is taken from the email field in the contact form). And after I indicate the address where to send the letter in the configuration file letters stop sending. How can this be related to spam filters? I like this system, it is simple and convenient to use. But such situations, when something stops working suddenly, grieve. I want to understand why this happens. I can give temporary access to the FTP, where my site is located, so you can see what's wrong. I'm honestly at a loss ....

rhukster commented 6 years ago

Mail is complex, especially if you are setting things up locally. Most linux servers come with a mailserver that will gladly accept email via SMTP, but that doesn't necessarily mean that email will route externally. Unless you are experienced in setting up email servers, I suggest using a 3rd party SMTP service that provide instructions on how to send through them.

here's a list i googled:

https://www.formget.com/smtp-service-providers/

andyberkoff commented 4 years ago

The site is hosted by the provider and there all mail servers are configured. a problem with sending mail through a form that is created using GRAV. And there are a lot of such minor problems. the documentation has little information on the details of the GRAV. (           

Суббота, 28 октября 2017, 18:07 +03:00 от Andy Miller notifications@github.com:   Mail is complex, especially if you are setting things up locally. Most linux servers come with a mailserver that will gladly accept email via SMTP, but that doesn't necessarily mean that email will route externally. Unless you are experienced in setting up email servers, I suggest using a 3rd party SMTP service that provide instructions on how to send through them. here's a list i googled: https://www.formget.com/smtp-service-providers/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .