I'm trying to use the EmailService plugin for the first time and ran
into an issue where sending an email fails (silently) when I don't do
a setServer operation on my mail object. When I do a normal <cfmail>
operation, it sends out email fine, I don't bother to set a server or
anything it just picks it up from the admin setting, but with the
EmailService CB plugin, it fails.
Looking through the CB code, I have a guess as to why (though I
haven't had a chance to prove it yet). When CB actually sends out the
email in the MailService.cfc (nice whitespace rant in the comments,
btw, Luis) it is just sending an attributeCollection to cfmail. Since
the attribute for the server name defaults to an empty string in the
mail settings bean, I'm guessing that it is passing in "" as the
server name to cfmail.
That leads me to a question, which is this: is this a Railo bug or a
ColdBox bug? If you pass in Server="" to cfmail in ACF, does it fall
back and use the setting in the Administrator? If so, that's a Railo
compatibility bug that I should file. If it does not send the email,
should we do something like remove the key from the memento before
passing it into the attributeCollection in the case of it being blank
so that the CF engine will fall back to the Administrator setting?
I'm running Railo 3.2RC and CB 3.0.0 M5 by the by.
Cheers,
Judah