This used to be so simple, you could just use IEnumerable(Of String) and pass that to the Send SMTP activity. Now they’ve gone and complicated it so you need IEnumerable(Of IResource).
So I set that variable type, use myVar.Concat({LocalResource.FromPath(ScreenshotFilepath}) to add to it. Works fine.
But now I need to delete all the files in that IEnumerable. When I do this…
…it only gives me the filename of each. I need the full path and filename. There is no property of currentIResource that has the full path and filename.
So the solution here is to use IEnumerable(Of ILocalResource). It looks like if you do that then everywhere it says it wants IEnumerable(Of IResource) it will still accept it.
Now when you do the For Each (or otherwise use the elements in the IEnumerable) you get currentFile (instead of currentIResource) and then have the LocalPath property:
To explain why they have done this, cause I also found it frustrating at first.
The IResource data type is an interface intended to allow compatibility across Windows, Linux and Mac operating systems and allow you to indicate files not only stored on your local disk, but for example, directly referencing a file on a sharepoint location, email attachment or other integration service type of file.
Its the same idea of using an iEnumerable, which is also an interface and can be used with Lists, Collections, Arrays etc.
That being said. The SMTP activity STILL is that easy if you want to just pass strings, as you always have.