When I send email with attachment then system output error that path does not exists

Hey,

When I try send email with attachment, then system output error that path does not exists. When I check this, file of course exists, path also correct, but system expected “.” in path. Any idea what fix this?

HI,

Can you try to add “new” as the following?

new string[1] {"your path"}

Regards,

In screenshot value is from debug process. In my code in Multiple Assign looks like this:

InvoiceAsAttachment = System.IO.Directory.GetFiles(InvoiceDirectroyPath.ToString, InvoiceName.ToString)
AttchamentEnumerable = InvoiceAsAttachment.AsEnumerable()

and then AttchamentEnumerable insert to AttachmentsCollection in Send Outlook Mail Message Activies.

1 Like

@pikut

You can directly use this

AttchamentEnumerable = InvoiceAsAttachment

no need of .AsEnumerable again array is also an enumerable type

cheers

I did that, but still the same error - "expected ‘.’ " :frowning:

@pikut

Can you please show the origninal error that you are getting if you are attaching the file please

cheers

Send Outlook Mail Message: Path does not exist. Verify that the path is correct.

Hi,

It’s always shown in Locals panel if target variable is array.

image

Let’s focus path string.
For now, can you try to use IO.File.Exists method in immediate panel, when error occurs?

image

Regards,

@pikut

Did you happen to check the path ?

looks like the error is with the path

cheers

Yes, I used File Exists Activities and returns True.

Can you check If send mail without the attachment? (set AttchamentEnumerable={} just before SendOutlookMailMessage)

Without the attachment mail send successful.

I’m sorry that I’m replying so late, but I forgot to come back here. The problem was a white space (space) in the path variable.

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