Hi Nathan
It might be helpful to address this problem through a separation of concerns. You've got the Dancer app's job which is to serve web pages. Then there's another job - to send emails - and from this viewpoint it makes sense to implement that as a separate piece of software.
On a large scale this can be done using a queuing service where the Dancer app puts a message onto the message queue (managed by a broker like RabbitMQ or ActiveMQ....) and your email sending software pulls the message off the queue and sends the email.
On a smaller scale I've done this without a message broker by treating a table in a database as a message queue - the Dancer app writes a line to the table with details of the message to send. A separate script - a daemon based on this
https://metacpan.org/pod/Daemon::Control checks for any new records in the table, sends the appropriate message and marks the row as 'sent'.
There's more than one way to skin a cat so that's just another approach to consider. Good luck!
Andrew