Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShopERP
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜龙飞
ShopERP
Commits
e8760627
Commit
e8760627
authored
Jul 15, 2025
by
PC-20220610JUCQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<develop>:(ShopERP 端)<无> 找回密码,增加 发送邮件的功能。
parent
ac0c7c75
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
9 deletions
+7
-9
CoreCms.Net.Model/ViewModels/Email/MailConfiguration.cs
+2
-2
CoreCms.Net.Utility/Helper/EmailSenderHelper.cs
+1
-3
CoreCms.Net.Web.Admin/Controllers/Com/LoginController.cs
+1
-0
CoreCms.Net.Web.Admin/appsettings.json
+2
-3
CoreCms.Net.Web.Admin/bin/Debug/net8.0/appsettings.json
+1
-1
No files found.
CoreCms.Net.Model/ViewModels/Email/MailConfiguration.cs
View file @
e8760627
...
...
@@ -9,14 +9,14 @@ namespace CoreCms.Net.Model.ViewModels.Email
public
class
MailConfiguration
{
public
string
SmtpServer
{
get
;
set
;
}
=
string
.
Empty
;
public
int
SmtpPort
{
get
;
set
;
}
=
587
;
public
int
SmtpPort
{
get
;
set
;
}
=
465
;
public
string
UserName
{
get
;
set
;
}
=
string
.
Empty
;
public
string
Password
{
get
;
set
;
}
=
string
.
Empty
;
public
string
DisplayName
{
get
;
set
;
}
=
"System Notification"
;
public
bool
EnableSsl
{
get
;
set
;
}
=
true
;
public
string
FromAddress
{
get
;
set
;
}
=
string
.
Empty
;
public
int
Timeout
{
get
;
set
;
}
=
10000
;
// 10 seconds
public
bool
UseDefaultCredentials
{
get
;
set
;
}
=
fals
e
;
public
bool
UseDefaultCredentials
{
get
;
set
;
}
=
tru
e
;
}
/// <summary>
...
...
CoreCms.Net.Utility/Helper/EmailSenderHelper.cs
View file @
e8760627
...
...
@@ -55,12 +55,10 @@ namespace CoreCms.Net.Utility.Helper
catch
(
SmtpException
ex
)
{
_logger
?.
LogError
(
ex
,
$"SMTP error sending email:
{
ex
.
Message
}
"
);
throw
;
// Rethrow to allow caller handling
}
catch
(
Exception
ex
)
{
_logger
?.
LogError
(
ex
,
$"Error sending email:
{
ex
.
Message
}
"
);
throw
;
}
}
...
...
@@ -84,7 +82,7 @@ namespace CoreCms.Net.Utility.Helper
var
mail
=
new
MailMessage
{
From
=
new
MailAddress
(
fromAddress
,
_config
.
DisplayName
),
From
=
new
MailAddress
(
fromAddress
),
Subject
=
model
.
Subject
??
"[No Subject]"
,
Body
=
model
.
Body
??
string
.
Empty
,
IsBodyHtml
=
model
.
IsBodyHtml
,
...
...
CoreCms.Net.Web.Admin/Controllers/Com/LoginController.cs
View file @
e8760627
...
...
@@ -365,6 +365,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
</
body
>
</
html
>
""",
IsBodyHtml
=
true
};
...
...
CoreCms.Net.Web.Admin/appsettings.json
View file @
e8760627
...
...
@@ -6,12 +6,11 @@
//
Mysql数据库链接字符串,请保持后面的属性别少。经过测试,mysql版本需要
5.7
或以上
},
"Smtp"
:
{
"Server"
:
"smtp.
exmail.qq
.com"
,
"Server"
:
"smtp.
qiye.aliyun
.com"
,
"Port"
:
465
,
"Username"
:
"erpservice@geekbuy.com"
,
"Password"
:
"co69W7xEZ6qjBo01"
,
"FromAddress"
:
"erpservice@geekbuy.com"
,
"DisplayName"
:
"My Application"
"FromAddress"
:
"erpservice@geekbuy.com"
},
//定时任务管理面板的账户密码
"HangFire"
:
{
...
...
CoreCms.Net.Web.Admin/bin/Debug/net8.0/appsettings.json
View file @
e8760627
...
...
@@ -6,7 +6,7 @@
//
Mysql数据库链接字符串,请保持后面的属性别少。经过测试,mysql版本需要
5.7
或以上
},
"Smtp"
:
{
"Server"
:
"smtp.
exmail.qq
.com"
,
"Server"
:
"smtp.
qiye.aliyun
.com"
,
"Port"
:
465
,
"Username"
:
"erpservice@geekbuy.com"
,
"Password"
:
"co69W7xEZ6qjBo01"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment