GPAL - Generally Positive Automation Library
v1.0
GPAL The Fluent Automation LIbrary
Toggle main menu visibility
Loading...
Searching...
No Matches
GPALMailSettings.cs
1
// =============================================================================
2
// GPAL - Generally Positive Automation Library
3
// Copyright © 2026 Software Decisions, Inc. All rights reserved.
4
//
5
// This file is part of GPAL.
6
// Licensed under the Business Source License 1.1
7
//
8
// Primary development, architecture, and vision by Michael B. Vederman,
9
// CEO of Software Decisions, Inc., Texas.
10
//
11
// Internal development maintained privately.
12
// Public releases appear on GitHub: https://github.com/SoftwareDecisionsInc/GPAL.
13
//
14
// See LICENSE for full terms, including Additional Use Grant.
15
// =============================================================================
16
17
using
MimeKit;
18
using
System;
19
using
System.Collections.Generic;
20
using
System.Linq;
21
using
System.Text;
22
using
System.Threading.Tasks;
23
24
namespace
GenerallyPositive
25
{
30
internal
class
GPALMailSettings
31
{
32
public
string
IMAPServerName {
get
;
set
; }
33
public
string
POPServerName {
get
;
set
; }
34
public
string
SMTPServerName {
get
;
set
; }
35
public
int
IMAPPortNum {
get
;
set
; }
36
public
int
POPPortNum {
get
;
set
; }
37
public
int
SMTPPortNum {
get
;
set
; }
38
// internal, because as a public MailboxAddress it went into the settings file as a whole MimeKit object
39
// - route, local part, domain and an entire Encoding with its fallbacks and code pages - and nothing
40
// could read that back
41
internal
MailboxAddress FromEmailAddress {
get
;
set
; }
42
47
public
string
FromAddress
48
{
49
get
50
{
51
return
FromEmailAddress?.ToString();
52
}
53
set
54
{
55
FromEmailAddress =
true
==
string
.IsNullOrWhiteSpace(value) ? null : MailboxAddress.Parse(value);
56
}
57
}
58
internal
List<MailboxAddress> ToEmailAddresses {
get
;
set
; } =
new
List<MailboxAddress>();
59
internal
List<MailboxAddress> CcEmailAddresses {
get
;
set
; } =
new
List<MailboxAddress>();
60
internal
List<MailboxAddress> BccEmailAddresses {
get
;
set
; } =
new
List<MailboxAddress>();
61
internal
List<string> Attachments {
get
;
set
; } =
new
List<string>();
62
internal
string
BodyText {
get
;
set
; }
63
internal
string
BodyHTML {
get
;
set
; }
64
internal
string
Subject {
get
;
set
; }
65
internal
List<ReceivedEmail> ReceivedEmails {
get
;
set
; } =
new
List<ReceivedEmail>();
66
67
// what Receive is allowed to fetch. the whole mailbox by default, which is what it has always done
68
internal
bool
UnreadOnly {
get
;
set
; }
69
internal
int
MaxMessages {
get
;
set
; } =
int
.MaxValue;
70
// internal, so a settings file holds servers and ports and never who you are or your password. a
71
// credential is where those belong
72
internal
string
UserName {
get
;
set
; }
73
internal
string
Password {
get
;
set
; }
74
internal
ICredentials Credentials {
get
;
set
; }
75
}
76
}
77
GenerallyPositive
Definition
Application.cs:32
Common
GPALMailSettings.cs
Generated by
1.17.0