修改邮件端口测试
This commit is contained in:
@@ -13,6 +13,7 @@ using IRaCIS.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using MailKit.Security;
|
||||
using MimeKit;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -601,24 +602,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
messageToSend.Body = builder.ToMessageBody();
|
||||
|
||||
using (var smtp = new MailKit.Net.Smtp.SmtpClient())
|
||||
{
|
||||
|
||||
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
||||
|
||||
|
||||
await smtp.ConnectAsync("smtp.163.com", 465, SecureSocketOptions.StartTls);
|
||||
|
||||
|
||||
await smtp.AuthenticateAsync("iracis_grr@163.com", "XLWVQKZAEKLDWOAH");
|
||||
|
||||
|
||||
await smtp.SendAsync(messageToSend);
|
||||
|
||||
|
||||
await smtp.DisconnectAsync(true);
|
||||
}
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, null);
|
||||
|
||||
|
||||
await _trialSiteSurveyRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
@@ -857,19 +844,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
messageToSend.Body = builder.ToMessageBody();
|
||||
|
||||
using (var smtp = new MailKit.Net.Smtp.SmtpClient())
|
||||
{
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, null);
|
||||
|
||||
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
||||
|
||||
await smtp.ConnectAsync("smtp.163.com", 465, SecureSocketOptions.StartTls);
|
||||
|
||||
await smtp.AuthenticateAsync("iracis_grr@163.com", "XLWVQKZAEKLDWOAH");
|
||||
|
||||
await smtp.SendAsync(messageToSend);
|
||||
|
||||
await smtp.DisconnectAsync(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var trialId = joinCommand.TrialId;
|
||||
|
||||
Reference in New Issue
Block a user