Skip to main content

Hallo,

AAe 360 version: build 23186 on-premise,

E-mail package: 3.6.0-20210504-084515

I’m having a hard times getting number of attachment (email propertie from a dictionary variable: emailNoOfAttachments) of e-mails from a e-mail box connected via:

 

 

For every e-mail i get null despite some of the e-mails have attachments.

Furthermore, all other e-mail attributes work flawlessly, such as: emailSubject, emailFrom , emailTo…

 

What can be the reason for this issue? Where should i look for?

Any clues?

 

greetings Michal

Hallo,

AAe 360 version: build 23186 on-premise,

E-mail package: 3.6.0-20210504-084515

I’m having a hard times getting number of attachment (email propertie from a dictionary variable: emailNoOfAttachments) of e-mails from a e-mail box connected via:

 

 

For every e-mail i get null despite some of the e-mails have attachments.

Furthermore, all other e-mail attributes work flawlessly, such as: emailSubject, emailFrom , emailTo…

 

What can be the reason for this issue? Where should i look for?

Any clues?

 

greetings Michal

-Make sure you are using the correct key as “emailNoOfAttachments“ as it is case sensitive.

-you will get value for the variable “emailNoOfAttachments“ inside a email loop only like “For each email in mailbox.”

-Try updating version for Email package.

-Try to log values for subject line and email ID for which you are getting no. of attachment count and log for null values also to get clear picture


Hallo,

AAe 360 version: build 23186 on-premise,

E-mail package: 3.6.0-20210504-084515

I’m having a hard times getting number of attachment (email propertie from a dictionary variable: emailNoOfAttachments) of e-mails from a e-mail box connected via:

 

 

For every e-mail i get null despite some of the e-mails have attachments.

Furthermore, all other e-mail attributes work flawlessly, such as: emailSubject, emailFrom , emailTo…

 

What can be the reason for this issue? Where should i look for?

Any clues?

 

greetings Michal

  • Make sure you're referencing the key exactly as emailNoOfAttachments—it's case-sensitive.

  • try to use loop ike “For each email in mailbox.” If you're accessing it outside that context, it might not work.

  • try to update Email package version 

  • try to add logs for null value and also where you are getting no of attachment count


Hallo,

it seems that it was known issue which had been fixed with 3.18.2 release of an e-mail package.


Hi ​@MichalTurek ,

 

Indeed. The bug was fixed in the 3.18.2 package version.

 

 


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?


Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication


How about your Control Room version?


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,

 

As I checked, this error can be caused by an invalid SSL certificate or lack of an authorized SSL certificate. In that case, you can try the below workaround:

 

Confirm the certificate issue by using an online SSL test.

When the confirmation is complete, follow these instructions to install the certificate and connect the Control Room API.

  1. Obtain a CA-signed certificate.
  2. Install the certificate and copy it into Notepad.

    Import HTTPS and CA certificates

  3. Find the pem file in the C:\Program Files\Automation Anywhere\Enterprise\pki directory.
  4. Open it with a new instance of Notepad and paste the intermediate certificate from step 3 above the Site Certificate.
  5. Save the pem file.
  6. Restart the Automation Anywhere Control Room Reverse Proxy service.

Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,

 

As I checked, this error can be caused by an invalid SSL certificate or lack of an authorized SSL certificate. In that case, you can try the below workaround:

 

Confirm the certificate issue by using an online SSL test.

When the confirmation is complete, follow these instructions to install the certificate and connect the Control Room API.

  1. Obtain a CA-signed certificate.
  2. Install the certificate and copy it into Notepad.

    Import HTTPS and CA certificates

  3. Find the pem file in the C:\Program Files\Automation Anywhere\Enterprise\pki directory.
  4. Open it with a new instance of Notepad and paste the intermediate certificate from step 3 above the Site Certificate.
  5. Save the pem file.
  6. Restart the Automation Anywhere Control Room Reverse Proxy service.

Hallo,

Thanks You ​@Padmakumar for Your input.

So what should I install:

Exchange on-premise server certificate?

And where? into the CR host?


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,

 

As I checked, this error can be caused by an invalid SSL certificate or lack of an authorized SSL certificate. In that case, you can try the below workaround:

 

Confirm the certificate issue by using an online SSL test.

When the confirmation is complete, follow these instructions to install the certificate and connect the Control Room API.

  1. Obtain a CA-signed certificate.
  2. Install the certificate and copy it into Notepad.

    Import HTTPS and CA certificates

  3. Find the pem file in the C:\Program Files\Automation Anywhere\Enterprise\pki directory.
  4. Open it with a new instance of Notepad and paste the intermediate certificate from step 3 above the Site Certificate.
  5. Save the pem file.
  6. Restart the Automation Anywhere Control Room Reverse Proxy service.

Hallo,

Thanks You ​@Padmakumar for Your input.

So what should I install:

Exchange on-premise server certificate?

And where? into the CR host?

 

SSL certificate is for your Control Room itself. Import step is already I have provided in the previous response.


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,

 

As I checked, this error can be caused by an invalid SSL certificate or lack of an authorized SSL certificate. In that case, you can try the below workaround:

 

Confirm the certificate issue by using an online SSL test.

When the confirmation is complete, follow these instructions to install the certificate and connect the Control Room API.

  1. Obtain a CA-signed certificate.
  2. Install the certificate and copy it into Notepad.

    Import HTTPS and CA certificates

  3. Find the pem file in the C:\Program Files\Automation Anywhere\Enterprise\pki directory.
  4. Open it with a new instance of Notepad and paste the intermediate certificate from step 3 above the Site Certificate.
  5. Save the pem file.
  6. Restart the Automation Anywhere Control Room Reverse Proxy service.

Hallo,

Thanks You ​@Padmakumar for Your input.

So what should I install:

Exchange on-premise server certificate?

And where? into the CR host?

 

SSL certificate is for your Control Room itself. Import step is already I have provided in the previous response.

Thanks ​@Padmakumar,

but I have a proper SSL certificate installed in CR. Certificate is issued by our IT dept and it works correctly, Exchange server is also a on-premise domain host. Furthermore, on old e-mail package version everything works well, but the problem is I have to detect number of attachment of every email message.


Hallo, i’m facing another issue:

Since changing from 3.6.0 to newest 3.28.0 email package version, i’ve started to receive below error:

“The request failed. The request failed. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.

How could i fix that?

 

You are getting this error at which stage? Means at the Email Connection itself or while looping through the Emails?

Hallo ​@Padmakumar , having this error on the EWS Connection stage with 3.28.0 package. With 3.6.0 everythng works smooth...

 

Which authentication method are you using?

 

 

EWS server Basic authentication

 

How about your Control Room version?

AAe 360 version 33: build 23186 on-premise,

 

As I checked, this error can be caused by an invalid SSL certificate or lack of an authorized SSL certificate. In that case, you can try the below workaround:

 

Confirm the certificate issue by using an online SSL test.

When the confirmation is complete, follow these instructions to install the certificate and connect the Control Room API.

  1. Obtain a CA-signed certificate.
  2. Install the certificate and copy it into Notepad.

    Import HTTPS and CA certificates

  3. Find the pem file in the C:\Program Files\Automation Anywhere\Enterprise\pki directory.
  4. Open it with a new instance of Notepad and paste the intermediate certificate from step 3 above the Site Certificate.
  5. Save the pem file.
  6. Restart the Automation Anywhere Control Room Reverse Proxy service.

Hallo,

Thanks You ​@Padmakumar for Your input.

So what should I install:

Exchange on-premise server certificate?

And where? into the CR host?

 

SSL certificate is for your Control Room itself. Import step is already I have provided in the previous response.

Thanks ​@Padmakumar,

but I have a proper SSL certificate installed in CR. Certificate is issued by our IT dept and it works correctly, Exchange server is also a on-premise domain host. Furthermore, on old e-mail package version everything works well, but the problem is I have to detect number of attachment of every email message.

 

The given error indicates that its the issue of lacking a valid SSL certificate though.

 

If you are confident on the validity of the existing certificate, I would recommend trying with any other Email package version except the older one and the latest one and see how it goes.


@MichalTurek, have you been able to try this with any other Email package version as ​@Padmakumar suggested?


@MichalTurek, have you been able to try this with any other Email package version as ​@Padmakumar suggested?


 

Hallo ​@Shreya.Kumar Unfortunately every other package than 3.6.0 doesn’t work


@MichalTurek, have you been able to try this with any other Email package version as ​@Padmakumar suggested?

 

Hallo ​@Shreya.Kumar Unfortunately every other package than 3.6.0 doesn’t work

 

@MichalTurek , 

As a last piece of advice, requesting to check below things and see if it helps or not.

The Mail Exchange server uses HTTPS for EWS, and Java needs to validate the server’s certificate. If the certificate is self-signed, missing intermediate CAs, or not in the Java truststore, the SSL handshake fails. Basic authentication doesn’t affect certificate validation—it’s the SSL layer that’s failing before credentials are even processed.

 

  1. Export the EWS Certificate

    • Open the EWS URL (e.g., https://mail.example.com/EWS/Exchange.asmx) in a browser.
    • Click the lock icon → View certificate → Export as .cer (Base64-encoded X.509).
  2. Import into Java Truststore

    keytool -importcert -trustcacerts -alias ewsCert \
    -file path/to/exported.cer \
    -keystore $JAVA_HOME/lib/security/cacerts
    • Run as administrator.
    • The default password is usually changeit.
  3. Restart the Bot Agent 

    • This ensures the new truststore is loaded.
  4. Verify Certificate Chain

    • Use OpenSSL to check:
      openssl s_client -connect mail.example.com:443 -showcerts
    • Look for verify return code: 0 (ok) at the end.

 

Make sure you're importing the certificate into JRE’s truststore, not just the system-wide one.