Relative Content

Tag Archive for javajakarta-mail

Implementing java SMTP client with only cert/private key based authentication

We have a need to create SMTP client which will be authorized by public/private key.My code looks like below, but server is not seeing the cert being passed and rejecting the request. can someone help me with the correct implementation? I have imported both public and private and created keystore.p12 file using openssl command: openssl pkcs12 -export -out keystore.p12 -inkey private.key -in public.crt -name “test”

Implementing java SMTP client with only cert/private key based authentication

We have a need to create SMTP client which will be authorized by public/private key.My code looks like below, but server is not seeing the cert being passed and rejecting the request. can someone help me with the correct implementation? I have imported both public and private and created keystore.p12 file using openssl command: openssl pkcs12 -export -out keystore.p12 -inkey private.key -in public.crt -name “test”

Implementing java SMTP client with only cert/private key based authentication

We have a need to create SMTP client which will be authorized by public/private key.My code looks like below, but server is not seeing the cert being passed and rejecting the request. can someone help me with the correct implementation? I have imported both public and private and created keystore.p12 file using openssl command: openssl pkcs12 -export -out keystore.p12 -inkey private.key -in public.crt -name “test”

How do I retrieve the email and the envelope content

I am using the JakartaMail API in my Spring Boot application and I have already created a fetch profile and I am able to get the message content printed out on the command line. However, I need some help in retrieving the email content from the IMAP server and storing it into an array so my client can properly display it. Furthermore, I am only getting envelope items, i.e. from, to subject, etc., but my request are not working and my requests are always timed out.

Error: EmailException (Java): Sending the email to the following server failed

I am using commons-email 1.6.0 to send emails. I am encountering a weird issue where the emails are only sent successfully when the application is launched from netbeans or using java 18.0.2. If I use a different java version I am getting this error. I can’t figure out why it only works using java 18.0.2, does anyone have an idea?