Condividi tramite


TeamFoundationMailService Class

A service for sending emails through SMTP.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Framework.Server.TeamFoundationMailService

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
<TeamFoundationServiceDependency(GetType(TeamFoundationSqlNotificationService))> _
<TeamFoundationServiceDependency(GetType(TeamFoundationRegistryService))> _
<TeamFoundationServiceDependency(GetType(IdentityService))> _
<TeamFoundationServiceDependency(GetType(TeamFoundationJobService))> _
Public Class TeamFoundationMailService _
    Implements ITeamFoundationService
[TeamFoundationServiceDependency(typeof(TeamFoundationSqlNotificationService))]
[TeamFoundationServiceDependency(typeof(TeamFoundationRegistryService))]
[TeamFoundationServiceDependency(typeof(IdentityService))]
[TeamFoundationServiceDependency(typeof(TeamFoundationJobService))]
public class TeamFoundationMailService : ITeamFoundationService
[TeamFoundationServiceDependency(typeof(TeamFoundationSqlNotificationService))]
[TeamFoundationServiceDependency(typeof(TeamFoundationRegistryService))]
[TeamFoundationServiceDependency(typeof(IdentityService))]
[TeamFoundationServiceDependency(typeof(TeamFoundationJobService))]
public ref class TeamFoundationMailService : ITeamFoundationService
[<TeamFoundationServiceDependency(typeof(TeamFoundationSqlNotificationService))>]
[<TeamFoundationServiceDependency(typeof(TeamFoundationRegistryService))>]
[<TeamFoundationServiceDependency(typeof(IdentityService))>]
[<TeamFoundationServiceDependency(typeof(TeamFoundationJobService))>]
type TeamFoundationMailService =  
    class 
        interface ITeamFoundationService 
    end
public class TeamFoundationMailService implements ITeamFoundationService

The TeamFoundationMailService type exposes the following members.

Constructors

  Name Description
Public method TeamFoundationMailService

Top

Properties

  Name Description
Public property AnonymousAuth It true then mail is sent to the server anonymously.
Public property CertThumbprint The thumbprint of the certificate used to authenticate against the SMTP server.
Public property Enabled A flag indicating if the mail service is enabled or not. If it is enabled, all other fields are guaranteed to have been loaded from the registry.
Public property EnableSsl Use Ssl when communicating to the SMTP server.
Public property FromAddress The default mail address that will show up in the "From" field of sent emails (e.g. a service account).
Public property LastRetry The last retry of sending failed mail requests.
Public property LogAllExceptions Indicator of whether all send mail exceptions should be logged.
Public property LogLevel The log level.
Public property MaxEmailBodySize The maximum email body size (in bytes).
Public property MaxRetryAttempts Maximum retries of sending failed mail requests.
Public property RetryInterval Interval (in seconds) between retry.
Public property SendMailJobDelay Delay duration (in seconds) of the send mail job.
Public property SmtpPassword Password portion of the credential used to connect to the SMTP server.
Public property SmtpPort The SMTP port.
Public property SmtpServer The SMTP host server network address.
Public property SmtpUser User credential for connecting to the SMTP server. When empty or null, integrated authorization is used.
Public property UseReplyTo A flag that controls whether the "From" field is populated with the originator's email address, or the default email address (and the originator's email address is put in the reply to list).

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method LoadSettings Load the TeamFoundationMailSevice settings from the registry.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method QueueMailJob(TeamFoundationRequestContext, IEnumerable<MailMessage>) Queue messages to be sent by the SendMailJob.
Public method QueueMailJob(TeamFoundationRequestContext, MailMessage) Queue a new message to be sent by the SendMailJob.
Public method Send(TeamFoundationRequestContext, IEnumerable<MailMessage>) Send multiple mail messages. If an exception is encountered, this method will not continue with sending.
Public method Send(TeamFoundationRequestContext, MailMessage) Send a mail message.
Public method ServiceEnd Invoked on service stop.
Public method ServiceStart Invoked on service start.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method ValidateMessage Validate the message to be sent or queued for sending.
Public method ValidateMessages Validate the messages to be sent or queued for sending.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Framework.Server Namespace