Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
最後の SMTP エラーまたはステータスメッセージテキストを返します。
xp_get_mail_error_text( )
この関数は、SMTP または MAPI のエラーまたはステータスメッセージテキストを表す LONG VARCHAR 値を返します。使用可能なエラーテキストがない場合、空の文字列または NULL が返されます。
いずれかの mail プロシージャ (xp_startmail、xp_startsmtp、xp_sendmail、xp_stopmail、xp_stopsmtp) のエラーまたはステータスメッセージテキストを取得する場合は、この関数を使用します。
SEND EMAIL システム権限が必要です。
なし
この例では、最後の SMTP メッセージテキストまたは MAPI メッセージテキストを取得します。
SELECT xp_get_mail_error_text( )
この例では、SMTP を使用して、プレーンテキストのメッセージの送信を開始しています。
BEGIN DECLARE err_smtp INTEGER; DECLARE err_code INTEGER; DECLARE err_msg LONG VARCHAR; SELECT xp_startsmtp( 'doe@sample.com', 'corporatemail.sample.com' ) INTO err_smtp; SELECT xp_get_mail_error_code( ), xp_get_mail_error_text( ) INTO err_code, err_msg; SELECT err_smtp, err_code, err_msg; END;