Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Biz.EmailPools
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Biz.EmailPools
Commits
9cba4934
Commit
9cba4934
authored
Jul 16, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
66377839
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+3
-3
RestfulEmailPool.cs
Src/Transforms/RestfulEmailPool.cs
+14
-9
No files found.
Src/Properties/AssemblyInfo.cs
View file @
9cba4934
...
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.6190")]
[assembly: AssemblyFileVersion("5.4.2023.6190")]
\ No newline at end of file
[assembly: AssemblyVersion("5.4.2024.7160")]
[assembly: AssemblyFileVersion("5.4.2023.7160")]
\ No newline at end of file
Src/Transforms/RestfulEmailPool.cs
View file @
9cba4934
...
...
@@ -25,7 +25,7 @@ namespace Kivii.EmailPools.Transforms
if
(
Items
.
IsNullOrEmpty
())
Items
=
new
List
<
EmailPool
>();
if
(
Item
!=
null
)
Items
.
Add
(
Item
);
Console
.
WriteLine
(
"-----------------------EmailCreateStart---------------------------------"
);
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
EmailPool
<
G
>>();
var
rtns
=
new
RestfulCreateResponse
<
EmailPool
<
G
>>();
rtns
.
Results
=
new
List
<
EmailPool
<
G
>>();
...
...
@@ -34,25 +34,30 @@ namespace Kivii.EmailPools.Transforms
{
try
{
//try
//{
// Console.WriteLine($"-----------------------from:{item.FromAddress}---------------------------------");
// var from = new MailAddress(item.FromAddress, item.FromAddress);
//}
//catch
//{
// Console.WriteLine($"-----------------------fromCatch:{item.FromAddress}---------------------------------");
// throw new Exception($"发送地址{item.FromAddress},格式错误");
//}
try
{
var
from
=
new
MailAddress
(
item
.
FromAddress
,
item
.
FromAddress
);
}
catch
{
throw
new
Exception
(
$"发送地址
{
item
.
FromAddress
}
,格式错误"
);
}
try
{
Console
.
WriteLine
(
$"-----------------------To:
{
item
.
ToAddress
}
---------------------------------"
);
var
to
=
new
MailAddress
(
item
.
ToAddress
,
item
.
ToName
);
}
catch
{
Console
.
WriteLine
(
$"-----------------------ToCatch:
{
item
.
ToAddress
}
---------------------------------"
);
throw
new
Exception
(
$"收件地址
{
item
.
ToAddress
}
,格式错误"
);
}
EmailPool
<
G
>
emailPool
=
new
EmailPool
<
G
>();
emailPool
.
PopulateWith
(
item
);
conn
.
Insert
(
emailPool
);
Console
.
WriteLine
(
"-----------------------EmailCreateEnd---------------------------------"
);
rtns
.
Results
.
Add
(
emailPool
);
}
catch
...
...
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