9.2.1.1 ahfctl setsmtp

Use the ahfctl setsmtp command to set the SMTP mail configuration parameters.

Syntax

ahfctl setsmtp 
[-h] 
[-debug] 
[-all] 
[-host HOST] 
[-user USER] 
[-password] 
[-from FROM] 
[-to TO] 
[-port PORT] 
[-cc CC] 
[-bcc BCC] 
[-ssl SSL] 
[-auth AUTH]

Parameters

Table 9-2 ahfctl setsmtp Command Parameters

Parameter Description

-debug

Specify the -debug option to enable debugging.

-all

Specify to set all smtp parameters.

-host HOST

Specify the name of the SMTP server, for example, smtphostname.

-user USER

Specify the name of the SMTP user, for example, smtpuser.

-password

Specify the password of the SMTP user.

-from FROM

Specify the email address of the sender.

-to TO

Specify the email address of the recipient.

-port PORT

Specify the port of the SMTP server, for example, 44.

-cc CC

Specify the CC email address.

-bcc BCC

Specify the BCC email address.

-ssl SSL

Specify true to enable SSL and false to disable SSL. Default: false.

-auth AUTH

Specify true to enable SMTP authentication and false to disable SMTP authentication. Default: false.

Example 9-2 ahfctl setsmtp

To set all the SMTP parameters:
ahfctl setsmtp -user smtpuser -from ahfteam@example.com -to touser@example.com -port 24 -password
To set only the to email address:
ahfctl setsmtp -to toaddress@example.com
If you see the Parameter smtp.to is already set message, then run the unsetsmtp command to clear the existing smtp.to configuration followed by the setsmtp command to configure smtp.to anew.
ahfctl setsmtp -to <email@id>
Parameter smtp.to is already set
ahfctl unsetsmtp -to
Unset SMTP parameters completed successfully.
ahfctl setsmtp -to <email>
Set SMTP parameters completed successfully.