SMTPAddress
Overview
The SMTPAddress
property of the Account
class represents the SMTP address associated with the account.
Syntax
vba
' To get the SMTP address
Account.SMTPAddress
' To set the SMTP address
Account.SMTPAddress = "newaddress@example.com"
Return Value
When getting the SMTPAddress, it returns a String
that represents the SMTP address of the account.
Example
This example demonstrates how to set a new SMTP address for an account and then retrieve it to confirm the update:
vba
Sub UpdateAndDisplaySMTPAddress(acc As Account)
' Set a new SMTP address for the account
acc.SMTPAddress = "newaddress@example.com"
' Retrieve and display the updated SMTP address
MsgBox "The updated SMTP address is: " & acc.SMTPAddress, vbInformation
End Sub