Net Helper class.
Class instance accessor: Net
More...
|
NetHelper | MailService (string smtpServer) |
| Set the SMTP server address for sending emails. If "E-Mail Account" program has been already configured, this method can be used to specify a different SMTP server to use for Net.SendMessage method. More...
|
|
NetHelper | MailService (string smtpServer, int port, bool useSsl) |
| Set the SMTP server address for sending emails. If "E-Mail Account" program has been already configured, this method can be used to specify a different SMTP server to use for Net.SendMessage method. More...
|
|
NetHelper | AddAttachment (string name, byte[] data) |
| Adds an attachment to the message. Can be called multiple times for attaching more files. More...
|
|
bool | SendMessage (string recipients, string subject, string messageText) |
| Sends an E-Mail. More...
|
|
bool | SendMessage (string from, string recipients, string subject, string messageText) |
| Sends an E-Mail. More...
|
|
ImapClient | ImapClient (string host, int port, bool useSsl) |
| IMAP mail client helper. More...
|
|
NetHelper | WebService (string serviceUrl) |
| Set the web service URL to call. More...
|
|
NetHelper | Put (string data) |
| Sends the specified string data using the PUT method. More...
|
|
NetHelper | Post (string data) |
| Sends the specified string data using the POST method. More...
|
|
NetHelper | AddHeader (string name, string value) |
| Adds the specified HTTP header to the HTTP request. More...
|
|
string | Call () |
| Call the web service url. More...
|
|
dynamic | GetData () |
| Call the web service url and returns the server response. More...
|
|
byte[] | GetBytes () |
| Call the web service url and returns the server response as binary data. More...
|
|
bool | Ping (string remoteAddress) |
| Ping the specified remote host. More...
|
|
NetHelper | WithCredentials (string user, string pass) |
| Use provided credentials when connecting. More...
|
|
Net Helper class.
Class instance accessor: Net
Set the SMTP server address for sending emails. If "E-Mail Account" program has been already configured, this method can be used to specify a different SMTP server to use for Net.SendMessage method.
- Returns
- NetHelper.
- Parameters
-
smtpServer | SMTP server address |
NetHelper MailService |
( |
string |
smtpServer, |
|
|
int |
port, |
|
|
bool |
useSsl |
|
) |
| |
Set the SMTP server address for sending emails. If "E-Mail Account" program has been already configured, this method can be used to specify a different SMTP server to use for Net.SendMessage method.
- Returns
- NetHelper.
- Parameters
-
smtpServer | SMTP server address |
port | SMTP server port. |
useSsl | If set to true use SSL. |
NetHelper AddAttachment |
( |
string |
name, |
|
|
byte[] |
data |
|
) |
| |
Adds an attachment to the message. Can be called multiple times for attaching more files.
- Returns
- NetHelper
- Parameters
-
name | File name (without path). |
data | Binary data of the file to attach. |
bool SendMessage |
( |
string |
recipients, |
|
|
string |
subject, |
|
|
string |
messageText |
|
) |
| |
Sends an E-Mail.
- Returns
true
, if message was sent, false
otherwise.
- Parameters
-
recipients | Message recipients. |
subject | Message subject. |
messageText | Message text. |
bool SendMessage |
( |
string |
from, |
|
|
string |
recipients, |
|
|
string |
subject, |
|
|
string |
messageText |
|
) |
| |
Sends an E-Mail.
- Returns
true
, if message was sent, false
otherwise.
- Parameters
-
from | Message sender. |
recipients | Message recipients. |
subject | Message subject. |
messageText | Message text. |
ImapClient ImapClient |
( |
string |
host, |
|
|
int |
port, |
|
|
bool |
useSsl |
|
) |
| |
IMAP mail client helper.
- Returns
- The IMAP client.
- Parameters
-
host | Host. |
port | Port. |
useSsl | If set to true use ssl. |
Set the web service URL to call.
- Returns
- NetHelper.
- Parameters
-
Example:
var iplocation = Net.WebService("http://freegeoip.net/json/").GetData();
Program.Notify("IP to Location", iplocation.city);
Sends the specified string data using the PUT method.
- Parameters
-
Sends the specified string data using the POST method.
- Parameters
-
data | String containing post data fields and values in the form field1=value1&filed2=value2&...&fieldn=valuen. |
NetHelper AddHeader |
( |
string |
name, |
|
|
string |
value |
|
) |
| |
Adds the specified HTTP header to the HTTP request.
- Returns
- NetHelper.
- Parameters
-
name | Header name. |
value | Header value. |
Call the web service url.
- Returns
- String containing the server response.
Call the web service url and returns the server response.
- Returns
- The returned value can be a simple string or an object containing all fields mapped from the JSON/XML response (see Net.WebService example).
Call the web service url and returns the server response as binary data.
- Returns
- Byte array containing the raw server response.
bool Ping |
( |
string |
remoteAddress | ) |
|
Ping the specified remote host.
- Parameters
-
remoteAddress | IP or DNS address. |
NetHelper WithCredentials |
( |
string |
user, |
|
|
string |
pass |
|
) |
| |
Use provided credentials when connecting.
- Returns
- NetHelper.
- Parameters
-
user | Username. |
pass | Password. |
The documentation for this class was generated from the following file: