Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

MailPitContainerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.MailPit v13.6.1

Resource for the MailPit server.

type MailPitContainerResource interface {
ExpressionValue
IComputeResource
Resource
ResourceWithArgs
ResourceWithConnectionString
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
ConnectionString for MailPit smtp endpoint in the form of smtp://host:port.
ConnectionStringExpression() *ReferenceExpression
propertyHostEndpointReferenceExpressionget
Gets the host endpoint reference for the SMTP endpoint.
Host() EndpointReferenceExpression
propertyPortEndpointReferenceExpressionget
Gets the port endpoint reference for the SMTP endpoint.
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the primary SMTP endpoint for the MailPit server.
PrimaryEndpoint() EndpointReference
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the MailPit SMTP endpoint.
UriExpression() *ReferenceExpression

Methods

methodWithDataBindMountbuilder
Configures a bind mount for the data directory of the MailPit container resource.
WithDataBindMount(
source string,
options ...*WithDataBindMountOptions,
) MailPitContainerResource
sourcestringThe source path on the host system to bind to the container.
options...*WithDataBindMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataBindMountOptions argument.

IsReadOnly*boolA value indicating whether the bind mount should be read-only. Default is false.
MailPitContainerResource

A reference to the IResourceBuilder with the configured bind mount.

Returns a handle; failures surface later via Err().

methodWithDataVolumebuilder
Configures a data volume for the MailPit container resource.
WithDataVolume(
name string,
options ...*WithDataVolumeOptions,
) MailPitContainerResource
namestringThe name of the data volume to be mounted.
options...*WithDataVolumeOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataVolumeOptions argument.

IsReadOnly*boolA boolean indicating whether the volume should be mounted as read-only.
MailPitContainerResource

A reference to the IResourceBuilder for further configuration.

Returns a handle; failures surface later via Err().