Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stencil Notification Template - "From" email setting leads to errors sending out mails #1999

Open
mandrasch opened this issue Aug 1, 2024 · 3 comments

Comments

@mandrasch
Copy link

mandrasch commented Aug 1, 2024

Describe the bug

Hey, we noticed that the template for email notification trys to set the sender of a form to the sender of the email notification.

image

image

image

At least in our experience that lead to email send errors because email servers refused to sent out mails for another domain. I don't have the specific error at hand currently, just wanted to let you know.

As far as I know, it would be best to leave that empty?

Steps to reproduce

  1. Select notification template
  2. Use Admin Notification from Stencils

Form settings

  • Multi-page form: Yes or No
  • Submission Method: Ajax or Page Reload
  • Client-side Validation: Yes or No
  • Custom Form Templates: Yes or No

Craft CMS version

4.5.13

Plugin version

2.1.0

Multi-site?

Yes

Additional context

No response

@engram-design
Copy link
Member

I'm pretty sure we made that change some time ago with the default stencil, as the stencil sets this to the replyTo property. Maybe this is an older install that hasn't had this setting updated in the default stencil?

@mandrasch
Copy link
Author

Hi @engram-design, thx for quick reply!

We have a starter craft project which was migrated from craft v3, could be the case that this wasn't updated properly.

In config/project/formie/stencils/ we have contactForm--5...yaml file:

data:
  availability: always
  availabilityFrom: null
  availabilitySubmissions: null
  availabilityTo: null
  dataRetention: forever
  dataRetentionValue: null
  fileUploadsAction: retain
  notifications:
    -
      attachFiles: true
      content: '[{"type":"paragraph","content":[{"type":"text","text":"A user submission has been made on the \""},{"type":"variableTag","attrs":{"label":"Form Name","value":"{formName}"}},{"type":"text","text":"\" form on "},{"type":"variableTag","attrs":{"label":"Site Name","value":"{siteName}"}},{"type":"text","text":" at "},{"type":"variableTag","attrs":{"label":"Timestamp (yyyy-mm-dd hh:mm:ss)","value":"{timestamp}"}}]},{"type":"paragraph","content":[{"type":"text","text":"Their submission details are:"}]},{"type":"paragraph","content":[{"type":"variableTag","attrs":{"label":"All Form Fields","value":"{allFields}"}}]}]'
      enabled: true
      from: '{field.emailAddress}'
      id: new981-8077
      name: 'Admin Notification'
      replyTo: '{field.emailAddress}'
      subject: 'A new submission was made on "{formName}"'
      templateId: ''
      to: '{systemEmail}' 

What is the easiest way to update / refresh the Admin Notification template in our starter project?

@engram-design
Copy link
Member

You can manually edit the YAML file in your starter project to either from: null or from: '' if it's not attached to a Craft install that you can go and edit your starter project on via a UI. If it is attached to a Craft install where you have access to the UI, you can just edit the stencil directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants