Created
February 4, 2019 19:46
-
-
Save BlitzkriegSoftware/ad28452a45966500f9b4ab7038ca08b6 to your computer and use it in GitHub Desktop.
Support Class for sending e-mail in .NET Core 2.1+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace testemail | |
{ | |
public class EmailDTO | |
{ | |
public string address { get; set; } | |
public string port { get; set; } | |
public int portNumber { get | |
{ | |
if (!int.TryParse(this.port, out int pn)) pn = 25; | |
return pn; | |
} | |
} | |
public string username { get; set; } | |
public string password { get; set; } | |
public string subject { get; set; } | |
public string body { get; set; } | |
public string to { get; set; } | |
public string[] tolist | |
{ | |
get | |
{ | |
return this.to.Split(new char[] { ';' }); | |
} | |
} | |
public string cc { get; set; } | |
public string[] cclist | |
{ | |
get | |
{ | |
return this.cc.Split(new char[] { ';' }); | |
} | |
} | |
public string from { get; set; } | |
public string replyto { get; set; } | |
public IEnumerable<string> replytolist | |
{ | |
get | |
{ | |
return this.replyto.Split(new char[] { ';' }); | |
} | |
} | |
public int howmany { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment