Skip to main content
Navigator | Tier 3
July 17, 2025
Solved

Getting number of attachments from an e-mail

  • July 17, 2025
  • 19 replies
  • 342 views

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

Best answer by Padmakumar

Hi ​@MichalTurek ,

 

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

 

 

19 replies

Navigator | Tier 3
July 17, 2025

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

Navigator | Tier 3
July 17, 2025

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

Navigator | Tier 3
July 18, 2025

Hallo,

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

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
July 18, 2025

Hi ​@MichalTurek ,

 

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

 

 

Padmakumar
Navigator | Tier 3
July 18, 2025

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?

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
July 18, 2025

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?

Padmakumar
Navigator | Tier 3
July 18, 2025

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...

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
July 18, 2025

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?

 

 

Padmakumar
Navigator | Tier 3
July 18, 2025

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

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
July 18, 2025

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?

Padmakumar