If you want to send an email from Blueriq, for example a confirmation message after filling out a form, here is how to do that.
Step-by-step guide
![](/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD0zfG1pbkxldmVsPTN9&locale=en_GB&version=2)
Create the mail message
A mail message in Blueriq is represented by an asset. To create this in Blueriq Studio:
- Create a new Asset;
- Provide a name, for example ThankYouMail, and select the type Email in the general section;
- You can now provide both the subject and the message body in the asset. You can use HTML and Text Substitution Language: TSL in the message.
![Blueriq Knowledge Base > How to send an email > email-asset.png](/download/attachments/4883432/email-asset.png?version=1&modificationDate=1405679416927&api=v2)
Create a service that sends the mail
With Blueriq you can use the Service call type: AQ_MailService to send an email. To create the service in Blueriq Studio:
- Create a new Service call with Service call type: AQ_MailService
- Provide the to and from and optionally the cc or bcc parameters. You can use both string values or expressions, refer to the Service call type: AQ_MailService description for the complete description.
- Provide the details of your SMTP host
- Provide the mail-asset parameter, in this case the ThankYouMail asset you have just created.
![Blueriq Knowledge Base > How to send an email > email-service.png](/download/attachments/4883432/email-service.png?version=1&modificationDate=1405679416647&api=v2)
Add the mail service to your flow
Provided you have a page flow which displays your form, you can now add the mail service to that flow so the mail is sent after you complete the form.
![Blueriq Knowledge Base > How to send an email > email-flow.png](/download/attachments/4883432/email-flow.png?version=1&modificationDate=1405679417147&api=v2)
Run your application
You are now ready to run your application in the Blueriq Runtime.