Support Class for sending e-mail in .NET Core 2.1+
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