Build data table excepction

While debugging the script, we are getting the below issue (error) at build data table activity

Build Data Table: Type ‘System.Net.Mail.MailMessage, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ is not allowed here. See DataSet and DataTable security guidance - ADO.NET | Microsoft Learn for more information.

@SN2

For Build DataTable activity, you should pass variable of type System.Data.DataTable but not System.Net.Mail.MailMessage

1 Like

@SN2 If you have used System.Net.MailMessage as the type for the Column in Build data table, I don’t think it is acceptable any more, As you can see in the link provided from the error, the types which are suitable for the Data Column types, MailMessage is not present in it. You should make use of Only those Data types in a Build datatable.

1 Like

We are also seeing this error, and it’s a rolling error. It’s moving by day from end user to end user, so it appears to possibly be related to a system update that is changing the behavior of system.data.

If its still required to put MailMessage in the datatable, change the column type as Object

Hi did you get any way around? I am seeing same