-
Notifications
You must be signed in to change notification settings - Fork 0
Ghost Mail
Adrien Castex edited this page May 30, 2016
·
1 revision
- Namespace : HarkLib.Net
- File : HarkLib.Net.dll
A ghost mail is a mail with custom headers.
Scope | Method |
---|---|
public | GhostMail() |
Scope | Get | Set | Type | Name |
---|---|---|---|---|
public | ✔️ | ✔️ | string | DestinationEMail |
public | ✔️ | ✔️ | string | DestinationUser |
public | ✔️ | string | DestinationHost | |
public | ✔️ | string | SourceHost | |
public | ✔️ | ✔️ | string | SourceUser |
public | ✔️ | ✔️ | string | SourceEMail |
public | ✔️ | ✔️ | string | Subject |
public | ✔️ | ✔️ | string | Content |
public | ✔️ | ✔️ | IPAddress | DestinationIP |
public | ✔️ | ✔️ | int | DestinationPort |
public | ✔️ | ✔️ | DateTime | Date |
public | ✔️ | ✔️ | string | ContentType |
public | ✔️ | ✔️ | Dictionary<string, string> | Headers |
public | ✔️ | ✔️ | string | this[string name] |
Scope | Method |
---|---|
protected | int WaitForResultCode(Stream stream) |
public | string GetMessage() |
public | void Send() |
GhostMail gm = new GhostMail();
gm.DestinationEMail = "[email protected]";
gm.DestinationUser = "Source User";
gm.SourceUser = "Dest User";
gm.SourceEMail = "[email protected]";
gm.Subject = "subject";
gm.Content = "content...";
gm.Send(); // Send the email
Or, with less redundant code :
GhostMail gm = new GhostMail()
{
DestinationEMail = "[email protected]",
DestinationUser = "Source User",
SourceUser = "Dest User",
SourceEMail = "[email protected]",
Subject = "subject",
Content = "content..."
};
gm.Send(); // Send the email
If you want to add new headers, you can use
gm.Headers.Add("CustomHeader", "CustomValue");
gm.Headers["CustomHeader"] = "CustomValue";
gm["CustomHeader"] = "CustomValue";
Dictionary<string, string> customHeaders = /* [...] */
gm.Headers.AddRange(customHeaders);
If you want to see what will be the result of the data part :
string data = gm.GetMessage();
Console.WriteLine(data);
Documentation
- HarkLib.Parsers.Generic.dll
- HarkLib.Parsers.dll
- HarkLib.Security.dll
- HarkLib.Core.dll
- HarkLib.Net.dll
Classes
- HarkLib.Parsers.Generic
- HarkLib.Parsers
- HarkLib.Security
- HarkLib.Core
- HarkLib.Net