Microsoft Office 365- Unable to Send Email with Attachments

Please help me. I need to send attachments using Send Email activity


The problem is that I don’t know what is the type of variable that the variable “AttachmensLoc” should be. Currently it is of type Array of Strings but the error message says:
Error ERROR Validation Error BC36754: 'String()' cannot be converted to 'IEnumerable(Of IResource)' because 'String' is not derived from 'IResource', as required for the 'Out' generic parameter 'T' in 'Interface IEnumerable(Of Out T)'. The selected value is incompatible with the property type. Utilities/U1-Send_Email.xaml

I have tried to locate the IResource type as shown below but I am still getting this error:
Error ERROR Validation Error BC36754: ‘IEnumerable(Of IResource)()’ cannot be converted to ‘IEnumerable(Of IResource)’ because ‘IEnumerable(Of IResource)’ is not derived from ‘IResource’, as required for the ‘Out’ generic parameter ‘T’ in ‘Interface IEnumerable(Of Out T)’. The selected value is incompatible with the property type. Tests/U1-Send_Email_365.xaml

Kindly assist.

Hi @RobinsonFrancis

Pls try this where you created variable -

AttachmentsLoc type: IEnumerable(Of IResource)

Email Subject type: String

Hi @RobinsonFrancis

Check the below thread

Hope this helps

@RobinsonFrancis,

Follow this solution.

@RobinsonFrancis

please try this AttachmentsLoc.Select(function(x) LocalResource.FromPath(x))

this converts each path to ilresource and gives as enumerable(of ilresource) as needed

Add .ToArray or .ToList at the end if you want to save as list or array of ilresource…all these are enumerables itself

cheers

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