Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bluegraybox/feedback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Feedback

This is a simple Chicago Boss application that lets you receive and review "feedback" messages, the idea being that it would let users give you feedback on what they like (or don't) about your web site. Mostly, the point of this is to demonstrate how Chicago Boss mail controllers work, since the documentation on that is pretty scattered, and there are some quirks of email configuration separate from Chicago Boss.

Installation

You need to have Erlang and Chicago Boss installed. Once those are working, edit your boss.config file and change the path setting to point to your Chicago Boss installation.

Configuring email

Chicago Boss can act as an email server, as well as a web server. The catch in setting up a development environment, where your app is running as a regular user, is that you don't have permission to use the standard email port (25), so you need to tell CB to use a different one. (See boss.config for how that's done.)

The other half of this is that you need to send email to that non-standard port. The easiest way to do this (at least on Linux) is using the mail utility (part of the mailutils package). Configuring it to use a non-standard port was surprisingly hard to track down documentation for, but in the end it's pretty straightforward. You just need to create a ~/.mailrc file containing.

 set sendmail="smtp://0.0.0.0:8025"

This tells mail to send all email by way of the server running on local port 8025 (as in boss.config).

Once that's all configured, you can send mail like so:

 $ mail -s "test 1" feedback@localhost
 Cc: 
 hi there! like your site!
 <ctrl-d>

Caveats

This is just example code. Run it, poke at it, see how it works. It may be helpful look at the first commit, to get a sense of what had to be added and changed from the auto-generated Chicago Boss app.

About

Chicago Boss sample app, including email controller and long-poll updates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published