What sequence of actions has to be taken in order to configure DB2 UDB SMTP mail?

I read https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.sql.rtn.doc/doc/r0055176.html and tried to run the command provided in the article, even though I fully expect SMTP to not work because my server requires a user name and password authentication that the command is missing.

So, just to try it out, I fired off:

db2 update db cfg using smtp_server 

It threw this error:

SQL1024N  A database connection does not exist.  SQLSTATE=08003 

Are there any prerequisites to the above command that I am missing?

And once we get this to work with the community’s help, how are we supposed to provide user name and password for the SMTP server in DB2 UDB?