Hello All,
I have created my own CRM plugin and installed it on CRM account. There is code where I'm attempting to send emails using my SMTP credentials.
smtpClient.Send(mail); throws following error.
System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.Mail.SmtpClient.Initialize()
at System.Net.Mail.SmtpClient..ctor(String host)
at TalygenCRMPlugin.Plugin.SendMail(String message, String entityType, String otherInfo)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Net.Mail.SmtpPermission
The Zone of the assembly that failed was:
MyComputer
*This post is locked for comments