asked on
In Liferay, I like to create an email with 400 emails in BCC
Hello
In Liferay, I like to create an email.
Il seams that Liferay does not support java.awt.Desktop.
(desktop.mail(new URI(sourceURL));)
Desktop.isDesktopSupported() returns false
I try with mailto.
I use the code
Page.getCurrent().getJavaScript().execute(
"window.location.href='" + new ExternalResource(sourceURL).getURL() + "';");
where sourceURL= mailto:test.pesonne@mail.com?subject=Test&bcc=[List of emails];
However: the url for mailto is limited to 2000 char.
So, I split the email liste and call Page.getCurrent().getJavaScript().execute() more than one time, but only the first call creates an email. The other calls are ignored.
Is there a way to create more that one email in a call?
Or even better, to create in Liferay an email with more than 2000 chars in the url?
ASKER
The code should not send an email. It should open an email in the default mail client.
With the parameters
- from
- bcc
- subject
What is the issue of no support of desktop.mail(new URI(sourceURL)) - if you can generate the email for a mailto, you should be able to use it to call SMTP
https://www.solutionanalysts.com/blog/send-email-liferay-portal/