SmtpConfiguration

Description

The SmtpConfiguration object contains all properties required for sending a Mail object via an SMTP server.

› Inherits:Object

Properties

password

This property holds the password used for authenticating against the SMTP server.

› Type:String
› Signal:passwordChanged()
› Attributes:Writable

port

This property holds the TCP port of the SMTP server.

› Type:SignedInteger
› Default:25
› Signal:portChanged()
› Attributes:Writable

senderHostname

This property holds the hostname of the sender (i.e. the sending device). It is sent to the SMTP for informational purposes but may be used for anti-spam mechanisms as well. For this reason it’s advisable to set a valid and publicly resolvable hostname when talking to public SMTP servers.

› Type:String
› Signal:senderHostnameChanged()
› Attributes:Writable

server

This property holds the hostname of the SMTP server to use for sending mails.

› Type:String
› Signal:serverChanged()
› Attributes:Writable

tls

This property holds whether to encrypt the connection to the SMTP server via TLS. TLS support should only be disabled in special cases, i.e. when using an internal SMTP relay which does not require authentication. Otherwise username and password are sent unencrypted over the network.

› Type:Boolean
› Default:true
› Signal:tlsChanged()
› Attributes:Writable

username

This property holds the username used for authenticating against the SMTP server.

› Type:String
› Signal:usernameChanged()
› Attributes:Writable

Example

See Mail example on how to use SmtpConfiguration.