How do i solve length cannot be less than zero?

Hey guys, im not sure why this is showing up i already was done with this attachment folder and didnt touch it at all. Today it decided to show this f- error. How do i solve this error? The thing is that it still can actually save the attachment i want but why does this error shows up >:(

The error start from here
image


image

image

@SIM_JUN_HUI_BERTRAM_CSOD,

you’re directly providing List of Mail to attachment(IO_mail)…

Can you follow screenshot as below?

mail variable in for each must be type of System.Net.Mail.MailMessage

image

Cheers,
Pankaj

i followed ur method but it is now showing an error object reference not set to an instance of an object

@SIM_JUN_HUI_BERTRAM_CSOD,

I guess that IO_mail variable coming as empty, please run in debug mode or print number of mail like IO_mail.count in log message.

Cheers,
Pankaj

nvm i found out why it was causing this problem due to too many emails containing the same subject actually causing this error.

@SIM_JUN_HUI_BERTRAM_CSOD,

There is a property Top to read number of email like 5, 10 etc…
you can also apply condition for specific attachment to be saved.

Thanks,
Pankaj

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.