I\'m new to Ruby and wondering why I am getting an error in this situation using the \'mail\' gem in a simple Sinatra app:
post \"/email/send\" do
@recipient
I think it's because the Mail gem uses instance_exec
under the hood. instance_exec
uses instance variables from the object it's being called on and not from the caller. What I'd do is find a method in the Mail gem that does not use instance tricks but passes an explicit configuration object to the block, and proceed from there. Spares a few gray hairs.