Udostępnij za pośrednictwem


Metoda SetEmailConfiguration (MSReportServer_ConfigurationSetting WMI)

Konfiguruje rozszerzenia dostarczania poczty e-mail, używany przez serwer raportów do wysyłania wiadomości e-mail.

Składnia

Public Sub SetEmailConfiguration(ByVal SendUsingSMTPServer As Boolean, _
    ByVal SMTPServer As String, ByVal SenderEmailAddress As String, _
    ByRef HRESULT As Int32)
public void SetEmailConfiguration (Boolean SendUsingSMTPServer, 
   string SMTPServer, string SenderEmailAddress, 
   out Int32 HRESULT);

Parameters

  • SendUsingSMTPServer
    logiczny wskazująca, czy serwer ma być używany serwer SMTP do wysyłania wiadomości e-mail.Wartość tę zestaw tylko wartość true.Wartością domyślną jest false.

  • SMTPServer
    Ciąg zawierający nazwę lub adres IP serwera SMTP.

  • SenderEmailAddress
    Adres e-mail używane w "od: „ pole dla wiadomości e-mail wysyłane z serwer raportów.

  • HRESULT
    [Brak] Wartość wskazująca, czy wywołanie zakończyło się powodzeniem, czy nie.

Wartość zwracana

Zwraca HRESULT wskazując Powodzenie lub Niepowodzenie wywołania metoda. Wartość 0 wskazuje, że wywołanie metoda zakończyła się pomyślnie.Wartość różną od zera wskazuje, że wystąpił błąd.

Remarks

Gdy SendUsingSMTPServer parametr jest ustawiony na true, SendUsing wpisowi serwer raportów plik konfiguracji jest ustawiona na wartość 1.Kiedy SendUsingSMTPServer jest zestaw do false, SendUsing wpis nie jest skonfigurowany.

Ta metoda nie dostarcza sposób dla użytkowników ustawić SendUsing wpisu na serwerze raportów plik konfiguracja na wartość inną niż 1.Aby skonfigurować serwer do innych niż poczta SMTP, należy ręcznie zmodyfikować plik konfiguracja.

Wymagania

**Obszar nazw:**root\Microsoft\SqlServer\ReportServer\RS_<EncodedInstanceName>\v10\Admin

**Platforma:**Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional with Service Pack 2 (SP2) or Service Pack 1 (SP1); or Windows 2000 (all versions)