Hi Everyone, Is it possible to run Lucee without a...
# lucee
g
Hi Everyone, Is it possible to run Lucee without a mailserver? I have always just had one... I ask because... At the moment I am trying to build a docker container (using the Ortus CommandBox Image) - and for unknown reasons - right at this minute, the configuration of the mail server is not being "stuck".... But that isn't really the issue I am asking about. It's more along the lines of - on Application start - the App is failing and I am getting exceptions about a SMTP mail server not being defined. Thus the question : is a configured mail server, technically, mandatory?
q
You shouldn't need to define a mail server unless something in your code is trying to send mail.. And it should only stop with that error once it runs across a CFMAIL tag (or function call).
So -- you may want to check your app to see if there is a cfmail tag being called somewhere on start.
g
Thanks @quetwo Hahaha - sometimes - it's the simple things! I didn't even think of that! And of course we do indeed shoot off an email within the onApplicationStart() handler - to alert ourselves that t he app has started (or been restarted)!
q
Sometimes you just need to talk it out 😉
👍🏼 1
✅ 1
👍 2
g
I talk to myself all the time... It's always good to get a second opinion from an expert 😄 😂
d
For dev/qa/staging environments, you can always set up something like Greenmail (which emulates POP/IMAP/SMTP) or Mailpit (a fake SMTP server, w/Web UI for viewing the messages). We actually use both in our stack. We use Mailpit for our general purpose SMTP server, since it ensures no emails are actually sent out but provides a nice Web UI for viewing the messages. We use Greenmail when we need to test POP/IMAP functionality. Both run as standalone apps that require no other dependencies (although Greenmail does require a Java).
e
Yes, you can run Lucee without a mail server. For dev on my windows machine I setup Xampp, which ships with a simple mailserver. If you do not like it, then Hmail server is another opensource product that runs on windows and can store messages in mysql or sql database as well standard mail access.
e
FakeSMTP is also good. its just simple jar that runs an smtp server on any port. https://nilhcem.com/FakeSMTP/
👍 1