|
|
Line 1,250: |
Line 1,250: |
|
Howdy from a python function |
|
Howdy from a python function |
|
</pre> |
|
</pre> |
|
|
|
⚫ |
|
|
⚫ |
{{works with|Db2 LUW}} version 9.7 or higher. |
|
⚫ |
|
|
⚫ |
You must first set the SMTP server in the database from which you want to send the message. |
|
⚫ |
|
|
⚫ |
UPDATE DB CFG FOR myDb USING SMTP_SERVER 'smtp.ibm.com'; |
|
|
|
|
⚫ |
CALL UTL_MAIL.SEND ('senderAccount@myDomain.com','recipientAccount@yourDomain.com', NULL, NULL, 'The subject of the message', 'The content of the message'); |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
db2 => UPDATE DB CFG FOR myDb USING SMTP_SERVER 'smtp.ibm.com'; |
|
⚫ |
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully. |
|
⚫ |
db2 => CALL UTL_MAIL.SEND ('senderAccount@myDomain.com','recipientAccount@yourDomain.com', NULL, NULL, 'The subject of the message', 'The content of the message'); |
|
|
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
If you receive a "SQL1336N The remote host "smtp.ibm.com" was not found. SQLSTATE=08001" message, it is because the SMTP_SERVER is not valid. |
|
⚫ |
More information in the [https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0055177.html IBM Knowledge center] |
|
|
|
|
|
|
=== Windows === |
|
=== Windows === |
Line 1,503: |
Line 1,483: |
|
} |
|
} |
|
}</lang> |
|
}</lang> |
|
|
|
|
⚫ |
|
|
⚫ |
{{works with|Db2 LUW}} version 9.7 or higher. |
|
⚫ |
|
|
⚫ |
You must first set the SMTP server in the database from which you want to send the message. |
|
⚫ |
|
|
⚫ |
UPDATE DB CFG FOR myDb USING SMTP_SERVER 'smtp.ibm.com'; |
|
|
|
|
⚫ |
CALL UTL_MAIL.SEND ('senderAccount@myDomain.com','recipientAccount@yourDomain.com', NULL, NULL, 'The subject of the message', 'The content of the message'); |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
db2 => UPDATE DB CFG FOR myDb USING SMTP_SERVER 'smtp.ibm.com'; |
|
⚫ |
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully. |
|
⚫ |
db2 => CALL UTL_MAIL.SEND ('senderAccount@myDomain.com','recipientAccount@yourDomain.com', NULL, NULL, 'The subject of the message', 'The content of the message'); |
|
|
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
If you receive a "SQL1336N The remote host "smtp.ibm.com" was not found. SQLSTATE=08001" message, it is because the SMTP_SERVER is not valid. |
|
⚫ |
More information in the [https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0055177.html IBM Knowledge center] |
|
|
|
|
|
=={{header|Tcl}}== |
|
=={{header|Tcl}}== |