本文整理汇总了C#中ActiveUp类的典型用法代码示例。如果您正苦于以下问题:C# ActiveUp类的具体用法?C# ActiveUp怎么用?C# ActiveUp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActiveUp类属于命名空间,在下文中一共展示了ActiveUp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRetrieveNewMessage
public void OnRetrieveNewMessage(MailQueueItem account,
ActiveUp.Net.Mail.Message message,
int folder_id,
string uidl,
string md5_hash,
bool has_parse_error,
bool unread,
int[] tags_ids)
{
MailMessageItem message_item;
if (_mailBoxManager.MailReceive(account.Account, message, folder_id, uidl, md5_hash, has_parse_error, unread, tags_ids, out message_item) < 1)
throw new Exception("MailReceive() returned id < 1;");
if (message_item == null) return;
foreach (var handler in _messageHandlers)
{
try
{
handler.HandleRetrievedMessage(account.Account, message, message_item, folder_id, uidl, md5_hash, unread, tags_ids);
}
catch (Exception ex)
{
_log.Error(ex, "MailItemManager::OnRetrieveNewMessage");
}
}
}
示例2: NewsGroup
internal NewsGroup(string name, int firstArticle, int lastArticle, bool postingAllowed, ActiveUp.Net.Mail.NntpClient nntp)
{
this._name = name;
this._firstArticle = firstArticle;
this._lastArticle = lastArticle;
this._postingAllowed = postingAllowed;
this._nntp = nntp;
}
示例3: OnRetrieveNewMessage
public void OnRetrieveNewMessage(MailQueueItem account,
ActiveUp.Net.Mail.Message message,
int folder_id,
string uidl,
string md5_hash,
bool unread,
int[] tags_ids)
{
if (mailBoxManager.MailReceive(account.Account, message, folder_id, uidl, md5_hash, unread, tags_ids) < 1)
throw new Exception("MailReceive() returned id < 1;");
}
示例4: PutChild
private void PutChild(ActiveUp.Net.Mail.Mailbox box)
{
foreach (ActiveUp.Net.Mail.Mailbox mailbox in box.SubMailboxes)
{
if (mailbox.Name.Replace(box.Name + "/\uFFFD", "\uFFFD").IndexOf("/\uFFFD") == -1)
{
ActiveUp.WebControls.TreeNode treeNode = tree.FindNode(box.Name).AddNode(mailbox.Name, "<span class=\"foldername\">\uFFFD" + mailbox.ShortName + "</span>\uFFFD", System.String.Empty);
treeNode.Click += new System.EventHandler(Navigate);
PutChild(mailbox);
}
}
}
示例5: FormatAddress
private string FormatAddress(ActiveUp.Net.Mail.Address address)
{
string result = string.Empty;
if (address.Name.TrimEnd() != string.Empty)
{
result = string.Format("{0} ({1})",address.Name,address.Email);
}
else
{
result = address.Email;
}
return result;
}
示例6: Add
/// <summary>
///
/// </summary>
/// <param name="header">The Header to be added in the collection.</param>
public void Add(ActiveUp.Net.Mail.Header header)
{
this.List.Add(header);
}
示例7: Add
/// <summary>
/// Adds a Message object to the collection. Can be useful to use the GetBindableTable() method with message from different sources.
/// </summary>
/// <param name="msg"></param>
public void Add(ActiveUp.Net.Mail.Message msg)
{
this.List.Add(msg);
}
示例8: Authenticate
/// <summary>
/// Authenticates using the given SASL mechanism.
/// </summary>
/// <param name="username">Username to authenticate as.</param>
/// <param name="password">Password.</param>
/// <param name="mechanism">SASL mechanism to be used.</param>
/// <returns>The server's response.</returns>
/// <example>
/// <code>
/// C#
///
/// Imap4Client imap = new Imap4Client();
/// imap.Connect("mail.myhost.com");
/// imap.Authenticate("user","pass",SASLMechanism.CramMd5);
/// imap.Disconnect();
///
/// VB.NET
///
/// Dim imap As New Imap4Client
/// imap.Connect("mail.myhost.com")
/// imap.Authenticate("user","pass",SASLMechanism.CramMd5)
/// imap.Disconnect()
///
/// JScript.NET
///
/// var imap:Imap4Client = new Imap4Client();
/// imap.Connect("mail.myhost.com");
/// imap.Authenticate("user","pass",SASLMechanism.CramMd5);
/// imap.Disconnect();
/// </code>
/// </example>
public override string Authenticate(string username, string password, ActiveUp.Net.Mail.SaslMechanism mechanism)
{
switch (mechanism)
{
case ActiveUp.Net.Mail.SaslMechanism.CramMd5:
return this._CramMd5(username, password);
case ActiveUp.Net.Mail.SaslMechanism.Login:
return this._Login(username, password);
}
return string.Empty;
}
示例9: ConnectSsl
public string ConnectSsl(System.Net.IPAddress[] addresses, int port,
ActiveUp.Net.Security.SslHandShake sslHandShake)
{
this.OnConnecting();
base.Connect(addresses, port);
this.DoSslHandShake(sslHandShake);
string response = this.ReadLine();
this.ServerCapabilities = this.Command("capability");
this.OnConnected(new ActiveUp.Net.Mail.ConnectedEventArgs(response));
return response;
}
示例10: BeginConnectSsl
public IAsyncResult BeginConnectSsl(string host, ActiveUp.Net.Security.SslHandShake sslHandShake,
AsyncCallback callback)
{
return this.BeginConnectSsl(host, 993, sslHandShake, callback);
}
示例11: OnNewMessageReceived
internal void OnNewMessageReceived(ActiveUp.Net.Mail.NewMessageReceivedEventArgs e)
{
if (NewMessageReceived != null) NewMessageReceived(this, e);
ActiveUp.Net.Mail.Logger.AddEntry("New message received : " + e.MessageCount + "...", 2);
}
示例12: ConnectSsl
public string ConnectSsl(System.Net.IPAddress addr, int port, ActiveUp.Net.Security.SslHandShake sslHandShake)
{
this.OnConnecting();
base.Connect(addr, port);
this.DoSslHandShake(sslHandShake);
string response = this.ReadLine();
this.OnConnected(new ActiveUp.Net.Mail.ConnectedEventArgs(response));
return response;
}
示例13: DoSslHandShake
private void DoSslHandShake(ActiveUp.Net.Security.SslHandShake sslHandShake)
{
this._sslStream = new System.Net.Security.SslStream(base.GetStream(), false, sslHandShake.ServerCertificateValidationCallback, sslHandShake.ClientCertificateSelectionCallback);
this._sslStream.AuthenticateAsClient(sslHandShake.HostName, sslHandShake.ClientCertificates, sslHandShake.SslProtocol, sslHandShake.CheckRevocation);
}
示例14: OnHeaderRetrieving
internal void OnHeaderRetrieving(ActiveUp.Net.Mail.HeaderRetrievingEventArgs e)
{
if(HeaderRetrieving!=null) HeaderRetrieving(this,e);
ActiveUp.Net.Mail.Logger.AddEntry("Retrieving Header at index "+e.MessageIndex+" out of "+e.TotalCount+"...",2);
}
示例15: ConnectSsl
public string ConnectSsl(string host, int port, ActiveUp.Net.Security.SslHandShake sslHandShake)
{
this.host = host;
this.OnConnecting();
base.Connect(host, port);
this.DoSslHandShake(sslHandShake);
string response = this.ReadLine();
this.OnConnected(new ActiveUp.Net.Mail.ConnectedEventArgs(response));
return response;
}