wwSMTP::lUseSsl

Determines if a secure connection using SSL/TLS should be used for this mail request.

Many mail servers today require secure connections, especially many of the online mail services most notable GMail, Outlook.com etc.

To use just set lUseSSL = .T.:

loSmtp.nMailMode = 0   && .NET Mode required - 0 is the default
loSmtp.cMailServer = "smtp.gmail.com:587"
loSmtp.lUseSsl = .T.

loSmtp.cUsername = "ricks25"
loSmtp.cPassword = "secret01"

You should only use this option if the mail server supports it. Check your ISP's mail service configuration options for your mail client to find out whether SSL or TLS is required for sending messages.

Default Value

Initial value: .f.

Remarks

nMailMode has to be set to 0 (.NET mode) in order to use this feature.

Note that some mail services like GMail have instituted special requirements to enable business accounts to send external SMTP emails that require applying various security settings (less secure sources). Please check your provider's SMTP server requirements.

Mail Services like GMail, Outlook.com etc. tend to have strict usage limits so if you plan using these mail client services for doing bulk emailing, check their policies. For high volume emails it's better to use a dedicated mailing service like Mailgun or SendGrid etc.

See also:

Class wwSMTP

© West Wind Technologies, 2023 • Updated: 06/07/20
Comment or report problem with topic