Documentation > Concepts > Mail
Boltwire comes with built in mail sending. It can be used to send fully templated emails to individual email addresses, individual members, and or groups and mailing lists of various kinds.
Example usage
You can create a contact page, so visitors can send an email. First you need to add following to your site.config:
<code>
mailAddress: username@email.com
mailMode: active
</code>
mailAddress is required. Replace username@email.com with a valid one.
Then we create a page called contact (how original!)
click on create, name your page contact and add following code to it:
Which gives you this:
Name:
Email:
Message:
Lastly, You need to create the page if not already there called site.auth.mail:
<code>
: @admin
contact: @guest
</code>
: @admin lets the Admin use mail on any page
contact: @guest lets guest visitors use mail on the contact page.
And done!
Details
If you're familiar with html then you should have understand it by now, but keep on reading for interesting details.
First we start with
<code>
[form]
</code>
which BoltWire understands as a form that needs to processed. We go along and add a text box.
<code>
</code>
This is the equivalent of
<code>
<input type="text">
</code>
in html. Same goes for email. For a message box we need to close it as well:
<code>
</code>
which is the equivalent of
<code>
<textarea cols="30" rows="4">
</code>
in html.
Before we close the form we need to tell BoltWire what to do with it after a click on submit. We do that by using session syntax.
If we want that know from where we receive an email we use session subject
<code>
[session subject "an email from my homepage"]
</code>
We also tell BoltWire to send the mail to our email
<code>
[session to ""]
</code>
Note: sitemail is configured in site.config<-
Last session, will actually email us the form:
<code>
[session mail]
</code>
Finally we close the form. Notice that unlike (x)html there's no need to use closing tags like /, just a simple [form].Learn More
If you want to learn more about BoltWire form processing, read Forms and Email Solutions. For advanced usage, read Commands.

