Send SMTP Mail: No compiled code to run error BC30561: 'Attachment' is ambiguous, imported from the namespaces or types 'Microsoft.SharePoint.Client, System.Net.Mail'. At line 16

@Victor_Victory

Check below post

Hope this helps you

Thanks