getgrav / grav-plugin-email

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

Email Using contact forms enquiry email rather then set send email #92

Closed toastiepop closed 1 year ago

toastiepop commented 6 years ago

title: Contact form: name: contact fields:

        name: name
        label: Name
        placeholder: 'Enter your name'
        autocomplete: 'on'
        type: text
        validate:
            required: true
    -
        name: email
        label: Email
        placeholder: 'Enter your email address'
        type: email
        validate:
            required: true
    -
        name: message
        label: Message
        placeholder: 'Enter your message'
        type: textarea
        validate:
            required: true
    -
        name: g-recaptcha-response
        label: Captcha
        type: captcha
        recaptcha_site_key: [DELETED PURPOSEFULLY]
        recaptcha_not_validated: 'Captcha not valid!'
        validate:
            required: true
buttons:
    -
        type: submit
        value: Submit
    -
        type: reset
        value: Reset
process:
    -
        captcha:
            recaptcha_secret: [DELETED PURPOSEFULLY]
    -
        email:
            from: '{{ config.plugins.email.from }}'
            to: '{{ config.plugins.email.to }}'
            subject: '[Site Contact Form] {{ form.value.name|e }}'
            body: '{% include ''forms/data.html.twig'' %}'
    -
        save:
            fileprefix: contact-
            dateformat: Ymd-His-u
            extension: txt
            body: '{% include ''forms/data.txt.twig'' %}'
    -
        message: 'Thank you for getting in touch!'
    -
        display: thankyou

If I put any email that does not match my domain in the email field above the email doesn't send. How ever having an email from my domain correctly send to the correct location.

I am using SparkPost as an SMTP client and have tried manually inputting emails as well as using the plugin defaults which are correctly set.

Your help in resolving this issue is appreciated.

rhukster commented 5 years ago

That restriction on the 'from' address is something specific to SparkPost. It's part of their spam protection scheme, nothing we can do about that.