I use the same address for sender and receiver.
For manual example (logic from controller) it works but for Managed Bean doesn’t.
EmailInfo emailInfo = new EmailInfo( "xxx@yyy.com", // recipients
“Cotation”, // subject
“Overdue Cotation” + “\n\n” + crmToken + “\n\n” + date,
“text/plain; charset=UTF-8”// the “from” address will be taken from the “cuba.email.fromAddress” app property
You’ve set up a scheduler, but I’m not sure what your scheduler is doing.
The image you posted shows that you have a scheduled task bean crmrai_ReminderCheckComponent which calls the Reminder method on schedule.
But I don’t see the call to the Cuba_Emailer.processQueuedEmails() which is the method you need to call to dispatch your queued email messages. Are you calling it inside Reminder?
I use the same setup as @kenince.mbithi, and it works for me.
Do you have anything on your email history? i.e. Administration > Email History
Are you logging your email scheduler and what is the execution history like? i.e Administration > Scheduled Tasks > Select the cuba_Emailer task > Then Click on Execution History.
Emailer JMX bean works fine. I can send test emails from console (ssl or smtp). In conclusion, I assume the email properties are correct.
Administration > Email History is ok, too. I have sender, receiver, body email, everything, but all emails are in Queue.
Indeed I don’t use Cuba_Emailer.processQueuedEmails() method. Can you give an implementation example?
Thank you!
You don’t need to implement it; it’s part of the framework. You just call it as a scheduled task as shown in @kenince.mbithi’s example. The bean will run on a schedule and check for messages in the queue and dispatch them for you.
Yes I set a scheduler. Scheduling Type cron. At the set time email sequence is sent. Nevertheless I don’t have any issues in deploy/tomcat/log. But all emails stay in queue. Maybe an “emailinfo” object example may be helpful.