Answers.Body: <p>Triggering an e-mail on form send will require some PHP code in order to work. Craft CMS has a 1st party plugin (this means its a free plugin made by the Craft CMS devs) for a contact form ... you can use that an it contains the PHP code needed to send emails on submission.</p>
  <p>If you don't want to use the provided plugin you will need to write the PHP code yourself by creating a module. A module is how Yii (the PHP framework Craft is built on) lets you write your own code to extend the functionality of the system. They're sometimes also called &quot;Plugins&quot; but they're ones you write yourself on the project instead of downloading from the plugin store.</p>
  <p>Info on how to get started with those is here:
  <a href="https://craftcms.com/docs/4.x/extend/module-guide.html" rel="nofollow noreferrer">https://craftcms.com/docs/4.x/extend/module-guide.html</a></p>
  <p>And there's tons of great tutorials online for writing them as well. Essentially you want to write a <em><strong>controller action</strong></em> that becomes the action on your form markup. That controller action is the code for sending the email and anything else you want to happen. You can look at Craft's plugin to see how they wrote theirs to give yourself a little bit of guidance.</p>
  <p>Craft Plugin (Store Link): <a href="https://plugins.craftcms.com/contact-form" rel="nofollow noreferrer">https://plugins.craftcms.com/contact-form</a></p>
  <p>Craft Plugin (Code Link): <a href="https://github.com/craftcms/contact-form" rel="nofollow noreferrer">https://github.com/craftcms/contact-form</a></p>
  <p>Sorry if I over-explained, you mentioned you are a student so I wanted to be thorough! Cheers</p>
  <p>** <strong>disclaimer - do not copy other people's code for your own work or plugins. Only use reference material to help gain understanding such as in an academic setting</strong> **</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-28T14:25:35.537Z
Answers.Text: Thanks for the comment! I've got it fixed!
Answers.UserDisplayName: Stef Verniers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-23T01:44:18.497Z
Answers.LastActivityDate: 2023-08-23T01:44:18.497Z
Answers.UserDisplayName: cherrykoda
Body: <p>I'm new to craft and I have to make a school project.</p>
  <p>At the moment I'm stuck when it comes down to sending emails.</p>
  <p>When a visitor lands on a page it can choose to subscribe to a fictional newsletter.
  In my twig template I use this as a form with an input field and a submit button.</p>
  <p>But in some way I'm not satisfied with the craft documentation because it's not really helpful. I have no clue where I have to trigger an email being send or whatsoever.
  In the documentation they are talking about some system messages but when I look for that option, I can't find it anywhere (Maybe because I dont't pay for it?)</p>
  <p>Here is an image what I mean:
  <a href="https://i.sstatic.net/nSqE2.png" rel="nofollow noreferrer">https://i.sstatic.net/nSqE2.png</a></p>
  <p>If someone knows a way how to send emails without plugins, please let me know.</p>
  <p>At the moment, my GMAIL smtp is setup correctly</p>
  
Tags: <emails>
Title: Craft CMS Utilities misses email option
ThreadText: # Craft CMS Utilities misses email option
  
  (Asked by: username_0 on 2023-07-16)
  
  I'm new to craft and I have to make a school project.
  
  At the moment I'm stuck when it comes down to sending emails.
  
  When a visitor lands on a page it can choose to subscribe to a fictional newsletter.
  In my twig template I use this as a form with an input field and a submit button.
  
  But in some way I'm not satisfied with the craft documentation because it's not really helpful. I have no clue where I have to trigger an email being send or whatsoever.
  In the documentation they are talking about some system messages but when I look for that option, I can't find it anywhere (Maybe because I dont't pay for it?)
  
  Here is an image what I mean:
  <https://i.sstatic.net/nSqE2.png>
  
  If someone knows a way how to send emails without plugins, please let me know.
  
  At the moment, my GMAIL smtp is setup correctly
  
  **Tags:** emails
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-23. Score: 1
  
  Triggering an e-mail on form send will require some PHP code in order to work. Craft CMS has a 1st party plugin (this means its a free plugin made by the Craft CMS devs) for a contact form ... you can use that an it contains the PHP code needed to send emails on submission.
  
  If you don't want to use the provided plugin you will need to write the PHP code yourself by creating a module. A module is how Yii (the PHP framework Craft is built on) lets you write your own code to extend the functionality of the system. They're sometimes also called "Plugins" but they're ones you write yourself on the project instead of downloading from the plugin store.
  
  Info on how to get started with those is here:
  <https://craftcms.com/docs/4.x/extend/module-guide.html>
  
  And there's tons of great tutorials online for writing them as well. Essentially you want to write a ***controller action*** that becomes the action on your form markup. That controller action is the code for sending the email and anything else you want to happen. You can look at Craft's plugin to see how they wrote theirs to give yourself a little bit of guidance.
  
  Craft Plugin (Store Link): <https://plugins.craftcms.com/contact-form>
  
  Craft Plugin (Code Link): <https://github.com/craftcms/contact-form>
  
  Sorry if I over-explained, you mentioned you are a student so I wanted to be thorough! Cheers
  
  \*\* **disclaimer - do not copy other people's code for your own work or plugins. Only use reference material to help gain understanding such as in an academic setting** \*\*
  
  > **Comments:**
  > **username_0**: Thanks for the comment! I've got it fixed!  
  
  ---
  
  