On Monday, December 28, 2020 9:46:09 AM CET Nicola Cisternino wrote: > Hi Dan
Hi Nicola, > and thank you for replay ... > ... excuse me ... but ... > https://github.com/klcodanr/danklco.com-site-cna/blob/cloud-native-sling/fea > ture/src/main/features/site.json link is broken :-( Please also have a look at the integration tests: https://github.com/apache/sling-org-apache-sling-commons-messaging-mail/blob/ master/src/test/java/org/apache/sling/commons/messaging/mail/it/tests/ SimpleMailServiceIT.java#L152 Commons Messaging Mail requires a CryptoService which decrypts the SMTP password. You could also create your own. Regards, O. > Il 12/26/20 5:19 PM, Daniel Klco ha scritto: > > Hey Nicola, > > > > The Apache Sling Commons Messaging Mail bundle uses Commons Crypto to > > encrypt the password for the SMTP server. You'll need to provide the > > > > configuration for Commons Crypto including: > > - > > org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomIvGenerato > > rRegistrar - > > org.apache.sling.commons.crypto.jasypt.internal.JasyptRandomSaltGenera > > torRegistrar - > > org.apache.sling.commons.crypto.jasypt.internal.JasyptStandardPBEStrin > > gCryptoService - > > org.apache.sling.commons.crypto.internal.FilePasswordProvider > > > > You can see the configuration (sans secrets) I use on my personal website > > here: > > https://github.com/klcodanr/danklco.com-site-cna/blob/cloud-native-sling/f > > eature/src/main/features/site.json > > > > Once that's set up correctly you should see an option under the 'Available > > crypto service' here: > > [serverhost:port]/system/console/sling-commons-crypto-encrypt > > > > From there you can enter your password to encrypt it and use it in > > > > the org.apache.sling.commons.messaging.mail.internal.SimpleMailService > > configuration. > > > > Hope that helps! > > -Dan > > > > On Wed, Dec 23, 2020 at 5:36 AM Nicola Cisternino <[email protected]> wrote: > >> Hi all > >> > >> I'm trying to compose and send emails (Sling 12) using Apache Sling > >> Commons Messaging Mail Bundle. > >> Can someone help me define a complete setup ? > >> All web examples refer to the use of AEM (CQ Mail service) :-( > >> I've already: > >> 1) installed bundle (org.apache.sling.commons.messaging.mail-1.0.0.jar) > >> 2) solved bundle dependencies installing: > >> - javax.mail-1.6.2.jar > >> - org.apache.sling.commons.crypto-1.0.0.jar > >> - org.apache.sling.commons.messaging-1.0.0.jar > >> 4) created and saved a "Simple mail service" configuration (configMgr) > >> 3) created a component using documentation example > >> (https://github.com/apache/sling-org-apache-sling-commons-messaging-mail) > >> > >> I don't see any log error ... but ... > >> > >> @Reference > >> MailService mailService; > >> > >> .... is always null .... > >> > >> Thanks a lot. > >> Nicola.
