[英]Error calling Process.Start(“mailto:…”)
hello i send a email with this code 你好,我用这个代码发送电子邮件
Process.Start("mailto:" + Email + "?subject=Contact" + "&body=" + bodymesssage);
in my pc work correctly , but in the server throw this error in the client side : 在我的电脑上可以正常工作,但是在服务器端会在客户端抛出此错误:
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Not enough storage is available to complete this operation 未捕获的Sys.WebForms.PageRequestManagerServerErrorException:Sys.WebForms.PageRequestManagerServerErrorException:没有足够的存储空间来完成此操作
this is a configuration missing? 这是缺少的配置吗? Thanks! 谢谢!
Use this instead: 使用此代替:
public static void SendMessage(String server, String[] emails, String subject, String body)
{
MailMessage message = new MailMessage(m_Sender, String.Join(",", emails), subject, body);
SmtpClient client = new SmtpClient(smtpServer);
client.Credentials = CredentialCache.DefaultNetworkCredentials;
try { client.Send(message); }
catch (Exception ex) { Console.WriteLine("ERROR!"); }
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.