Skip to content

Authenticate


Overview

The Authenticate method checks with the specified API service to validate your account

Syntax

vba
Account.Authenticate()

Return Value

Returns a boolean value of the validity of the account

Example

Example code snippet demonstrating how to validate an account:

vba
Set newAccount = MailerApp.Accounts.Add SMTPAddress:="test@example.com", _
                        ApiKey:="api-key-0123456789", _
                        ApiUrl:="https://apiUrl.com", _
                        AccountType:=olMailgun

If newAccount.Authenticate() = False Then
    Exit Sub
End If