This commit is contained in:
		
							parent
							
								
									1e855681c8
								
							
						
					
					
						commit
						0a71c7d118
					
				|  | @ -184,11 +184,10 @@ namespace BLL | ||||||
| 
 | 
 | ||||||
|                                 mail.Body = bodyStr; |                                 mail.Body = bodyStr; | ||||||
| 
 | 
 | ||||||
|                                 PushEmail(mail); |                               bool send=  PushEmail(mail); | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
| 
 |  | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 #endregion |                 #endregion | ||||||
|  | @ -203,29 +202,34 @@ namespace BLL | ||||||
|         /// 发送邮件 |         /// 发送邮件 | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="mail"></param> |         /// <param name="mail"></param> | ||||||
|         private static void PushEmail(MailMessage mail) |         private static bool PushEmail(MailMessage mail) | ||||||
|         { |         { | ||||||
|             //获取发送邮箱配置 |             //获取发送邮箱配置 | ||||||
|             Email_Pop pops = BLL.Email_PopService.GetEmail_Pop("7EC5E991-B7A0-495A-90ED-2BE15370C959"); |             Email_Pop pops = BLL.Email_PopService.GetEmail_Pop("7EC5E991-B7A0-495A-90ED-2BE15370C959"); | ||||||
|             if (pops != null) |             if (pops != null) | ||||||
|             { |             { | ||||||
|  |                 mail.From = new MailAddress(pops.EmailYx);//发件人邮箱地址 | ||||||
|                 SmtpClient client = new SmtpClient(pops.EmailFwq);//替换为你的SMTP服务器地址 |                 SmtpClient client = new SmtpClient(pops.EmailFwq);//替换为你的SMTP服务器地址 | ||||||
|                 client.Port = int.Parse(pops.EmailDk);//587或465如果使用SSL |                 client.Port = int.Parse(pops.EmailDk);//587或465如果使用SSL | ||||||
|                 client.EnableSsl = true;//如果服务器支持SSL,设置为true |                 client.EnableSsl = true;//如果服务器支持SSL,设置为true | ||||||
|                 client.DeliveryMethod = SmtpDeliveryMethod.Network; |                 client.DeliveryMethod = SmtpDeliveryMethod.Network; | ||||||
|                 client.UseDefaultCredentials = false; |                 client.UseDefaultCredentials = false; | ||||||
|                 client.Credentials = new NetworkCredential(pops.EmailYx, pops.EmailPass);//替换为你的邮箱和服务授权码 |                 client.Credentials = new NetworkCredential(pops.EmailYx, pops.EmailPass);//替换为你的邮箱和服务授权码 | ||||||
|                 mail.From = new MailAddress(pops.EmailYx);//发件人邮箱地址 |                 //client.Timeout = 6000;  //6秒超时 | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|                     client.Send(mail); |                     client.Send(mail); | ||||||
|  |                     client.Dispose();  //释放资源 | ||||||
|  |                     return true; | ||||||
|                     //Console.WriteLine("Email sent successfully."); |                     //Console.WriteLine("Email sent successfully."); | ||||||
|                 } |                 } | ||||||
|                 catch (Exception ex) |                 catch (Exception ex) | ||||||
|                 { |                 { | ||||||
|  |                     return false; | ||||||
|                     //Console.WriteLine("Email sending failed: " + ex.Message); |                     //Console.WriteLine("Email sending failed: " + ex.Message); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |             return false; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <_PublishTargetUrl>E:\诺必达合肥\发布\五环WebApi</_PublishTargetUrl> |     <_PublishTargetUrl>E:\诺必达合肥\发布\五环WebApi</_PublishTargetUrl> | ||||||
|     <History>True|2025-03-13T08:44:25.3220313Z||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History> |     <History>True|2025-04-01T01:52:56.3095742Z||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||;</History> | ||||||
|     <LastFailureDetails /> |     <LastFailureDetails /> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | @ -86,22 +86,22 @@ | ||||||
|       <publishTime>10/28/2024 14:02:50</publishTime> |       <publishTime>10/28/2024 14:02:50</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/App_global.asax.compiled"> |     <File Include="bin/App_global.asax.compiled"> | ||||||
|       <publishTime>03/13/2025 16:44:23</publishTime> |       <publishTime>04/01/2025 09:52:53</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/App_global.asax.dll"> |     <File Include="bin/App_global.asax.dll"> | ||||||
|       <publishTime>03/13/2025 16:44:23</publishTime> |       <publishTime>04/01/2025 09:52:53</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/Aspose.Words.dll"> |     <File Include="bin/Aspose.Words.dll"> | ||||||
|       <publishTime>12/06/2024 20:13:58</publishTime> |       <publishTime>12/06/2024 20:13:58</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/BLL.dll"> |     <File Include="bin/BLL.dll"> | ||||||
|       <publishTime>03/13/2025 16:44:14</publishTime> |       <publishTime>04/01/2025 09:52:32</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/BLL.dll.config"> |     <File Include="bin/BLL.dll.config"> | ||||||
|       <publishTime>12/26/2024 09:46:52</publishTime> |       <publishTime>12/26/2024 09:46:52</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/BLL.pdb"> |     <File Include="bin/BLL.pdb"> | ||||||
|       <publishTime>03/13/2025 16:44:14</publishTime> |       <publishTime>04/01/2025 09:52:32</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/BouncyCastle.Crypto.dll"> |     <File Include="bin/BouncyCastle.Crypto.dll"> | ||||||
|       <publishTime>12/18/2020 05:32:28</publishTime> |       <publishTime>12/18/2020 05:32:28</publishTime> | ||||||
|  | @ -128,10 +128,10 @@ | ||||||
|       <publishTime>07/25/2012 19:48:56</publishTime> |       <publishTime>07/25/2012 19:48:56</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/Model.dll"> |     <File Include="bin/Model.dll"> | ||||||
|       <publishTime>03/13/2025 10:57:48</publishTime> |       <publishTime>04/01/2025 09:52:26</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/Model.pdb"> |     <File Include="bin/Model.pdb"> | ||||||
|       <publishTime>03/13/2025 10:57:48</publishTime> |       <publishTime>04/01/2025 09:52:26</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/netstandard.dll"> |     <File Include="bin/netstandard.dll"> | ||||||
|       <publishTime>07/04/2024 14:13:01</publishTime> |       <publishTime>07/04/2024 14:13:01</publishTime> | ||||||
|  | @ -389,13 +389,13 @@ | ||||||
|       <publishTime>02/09/2013 00:42:28</publishTime> |       <publishTime>02/09/2013 00:42:28</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/WebAPI.dll"> |     <File Include="bin/WebAPI.dll"> | ||||||
|       <publishTime>03/13/2025 16:44:14</publishTime> |       <publishTime>04/01/2025 09:52:35</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/WebAPI.pdb"> |     <File Include="bin/WebAPI.pdb"> | ||||||
|       <publishTime>03/13/2025 16:44:14</publishTime> |       <publishTime>04/01/2025 09:52:35</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/WebAPI.xml"> |     <File Include="bin/WebAPI.xml"> | ||||||
|       <publishTime>03/13/2025 16:44:14</publishTime> |       <publishTime>04/01/2025 09:52:35</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="bin/WebGrease.dll"> |     <File Include="bin/WebGrease.dll"> | ||||||
|       <publishTime>01/23/2014 21:57:34</publishTime> |       <publishTime>01/23/2014 21:57:34</publishTime> | ||||||
|  | @ -479,7 +479,7 @@ | ||||||
|       <publishTime>10/28/2024 14:02:50</publishTime> |       <publishTime>10/28/2024 14:02:50</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="PrecompiledApp.config"> |     <File Include="PrecompiledApp.config"> | ||||||
|       <publishTime>03/13/2025 16:44:15</publishTime> |       <publishTime>04/01/2025 09:52:37</publishTime> | ||||||
|     </File> |     </File> | ||||||
|     <File Include="Scripts/bootstrap.js"> |     <File Include="Scripts/bootstrap.js"> | ||||||
|       <publishTime>10/28/2024 14:02:50</publishTime> |       <publishTime>10/28/2024 14:02:50</publishTime> | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |     <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> | ||||||
|     <UseIISExpress>true</UseIISExpress> |     <UseIISExpress>true</UseIISExpress> | ||||||
|     <Use64BitIISExpress /> |     <Use64BitIISExpress /> | ||||||
|     <IISExpressSSLPort /> |     <IISExpressSSLPort /> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue