-

 - e-mail

 

 -

   Flashr

 -

 LiveInternet.ru:
: 26.02.2007
:
:
: 6574

:


Windows Azure

, 28 2011 . 12:36 +
Windows Azure . , - . , , - . , 1) 2) Exchange .

, , SSL 587 . ,
Copy Source | Copy HTML
  1. var client = new SmtpClient(props["SmtpServer"])
  2.                              {
  3.                                  DeliveryMethod = SmtpDeliveryMethod.Network,
  4.                                  Credentials = new NetworkCredential(props["SmtpLogin"], props["SmtpPwd"]),
  5.                                  Port = int.Parse(props["SmtpPort"]),
  6.                                  EnableSsl = true,
  7.                              };
  8.  
  9.             what = what + @"
     ,   " + props["HostAddress"];
  10.  
  11.             try
  12.             {
  13. #if !DEBUG
  14.                 client.Send(props["SmtpLogin"],
  15.                     to,
  16.                     "Subj",
  17.                     string.Format(what, pars));
  18. #endif
  19.             }
  20.             catch (SmtpFailedRecipientsException)
  21.             {
  22.  
  23.             }



Copy Source | Copy HTML
  1. <add key="SmtpServer" value="smtp.gmail.com" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
  2. <add key="SmtpLogin" value="mail@gmail.com" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
  3. <add key="SmtpPwd" value="password" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
  4. <add key="SmtpPort" value="587" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />

, , native -

PS: Azure .
:  

: [1] []
 

:
: 

: ( )

:

  URL