Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Initialize()

void System.Net.Mail.SmtpClient.Initialize ( )
inlineprivate

Definition at line 290 of file SmtpClient.cs.

291 {
292 _transport = new SmtpTransport(this);
293 if (System.Net.NetEventSource.Log.IsEnabled())
294 {
295 System.Net.NetEventSource.Associate(this, _transport, "Initialize");
296 }
298 if (_host != null && _host.Length != 0)
299 {
300 _host = _host.Trim();
301 }
302 if (_port == 0)
303 {
304 _port = 25;
305 }
306 if (_targetName == null)
307 {
308 _targetName = "SMTPSVC/" + _host;
309 }
310 if (_clientDomain != null)
311 {
312 return;
313 }
315 IdnMapping idnMapping = new IdnMapping();
316 try
317 {
318 text = idnMapping.GetAscii(text);
319 }
320 catch (ArgumentException)
321 {
322 }
323 StringBuilder stringBuilder = new StringBuilder();
324 foreach (char c in text)
325 {
326 if (c <= '\u007f')
327 {
328 stringBuilder.Append(c);
329 }
330 }
331 if (stringBuilder.Length > 0)
332 {
333 _clientDomain = stringBuilder.ToString();
334 }
335 else
336 {
337 _clientDomain = "LocalHost";
338 }
339 }
string GetAscii(string unicode)
Definition IdnMapping.cs:44
SendOrPostCallback _onSendCompletedDelegate
Definition SmtpClient.cs:48
void SendCompletedWaitCallback(object operationState)
static readonly System.Net.NetEventSource Log
static void Associate(object first, object second, [CallerMemberName] string memberName=null)
override string ToString()
StringBuilder Append(char value, int repeatCount)

References System.Net.Mail.SmtpClient._clientDomain, System.Net.Mail.SmtpClient._host, System.Net.Mail.SmtpClient._onSendCompletedDelegate, System.Net.Mail.SmtpClient._port, System.Net.Mail.SmtpClient._targetName, System.Net.Mail.SmtpClient._transport, System.Net.NetEventSource.Associate(), System.Globalization.IdnMapping.GetAscii(), System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties(), System.Net.NetEventSource.Log, System.Net.Mail.SmtpClient.SendCompletedWaitCallback(), and System.text.

Referenced by System.Net.Mail.SmtpClient.SmtpClient(), System.Net.Mail.SmtpClient.SmtpClient(), and System.Net.Mail.SmtpClient.SmtpClient().