private bool SendEMailNotifyEx() { if (MyLockIDStr == "88886666ABCD110")//Test-秦皇汉武 { //string SendFileNameStr = MyAutoFileNameStr + ".jpg"; // MemoryStream MyMemoryStreamContent = new MemoryStream(RecieveFileBuffers); //LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", MyMemoryStreamContent, SendFileNameStr); // MyMemoryStreamContent.Close(); //LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", SnapID.ToString(), MyLockIDStr); LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc(SnapID.ToString(), MyLockIDStr); MySendMailProc.StartSendMail(); if (MySendMailProc.SendFlagID) { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "客户[{0}][{1}]扩展发送邮件通知成功!", MyLockIDStr, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); //this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "扩展发送邮件通知成功!"); } else { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "客户[{0}][{1}]扩展发送邮件通知失败!", MyLockIDStr, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "扩展发送邮件通知失败!"); } return(MySendMailProc.SendFlagID); } return(false); }
private bool SendEMailNotifyEx() { /* * int StartIndex=22; * string SendFileNameStr = MyAutoFileNameStr + ".jpg"; * MemoryStream MyMemoryStreamContent = new MemoryStream(MyReadBuffers, StartIndex, MyRecieveCount - StartIndex); * * LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", MyMemoryStreamContent, SendFileNameStr); * MySendMailProc.StartSendMail(); * MyMemoryStreamContent.Close(); * if (MySendMailProc.SendFlagID) * { * this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知成功!"); * } * else * { * this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知失败!"); * } * return MySendMailProc.SendFlagID; */ if (this.MyLoginUser.LockID == "88886666ABCD110") //Test { //string SendFileNameStr = MyAutoFileNameStr + ".jpg"; //MemoryStream MyMemoryStreamContent = new MemoryStream(RecieveFileBuffers); //LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", MyMemoryStreamContent, SendFileNameStr); //MyMemoryStreamContent.Close(); LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", SnapID.ToString(), this.MyLoginUser.LockID); MySendMailProc.StartSendMail(); //同步发送邮件 if (MySendMailProc.SendFlagID) { string MyTimeMarker = DateTime.Now.ToString() + ":" + DateTime.Now.Millisecond.ToString(); this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "客户[{0}][{1}]标准发送邮件通知成功!", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); //this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知成功!"); } else { string MyTimeMarker = DateTime.Now.ToString() + ":" + DateTime.Now.Millisecond.ToString(); this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "客户[{0}][{1}]标准发送邮件通知失败!", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); //this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知失败!"); } return(MySendMailProc.SendFlagID); } return(false); }
private bool SendEMailNotify() { string SendFileNameStr = MyAutoFileNameStr + ".jpg"; MemoryStream MyMemoryStreamContent = new MemoryStream(RecieveFileBuffers); LGJAsynchSocketService.SendMailProc MySendMailProc = new SendMailProc("*****@*****.**", MyMemoryStreamContent, SendFileNameStr); MySendMailProc.StartSendMail(); MyMemoryStreamContent.Close(); if (MySendMailProc.SendFlagID) { this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知成功!"); } else { this.MyAsynchLockServerSocketService.DisplayResultInfor(1, "发送邮件通知失败!"); } return(MySendMailProc.SendFlagID); }
public void SendEMailNotify() { MySendMailProc.StartSendMail();//真正的干活! }