Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

メール・サーバへの接続

次に、メール・サーバに接続します。まず、標準 Caché %Library パッケージに備わっている SMTP オブジェクトを生成します。また、smtpserver プロパティを設定して、サーバを認識する必要があります。

(個人のコンピュータの場合、ローカル・メールサーバ名を "**Server**" にします。 コンピュータ名が不明な場合は、Email プログラムのセットアップ内容から、出力メールまたは SMTP サーバの設定を確認します。)

—Utils.SendEmail—
Utils.SendEmail
ClassMethod SendEmail(Address As %String, MessageText As %String)
{
    // Create an SMTP object and connect to a server
    Set Mailer = ##class(%Net.SMTP).%New()

    // Fill in the name of your mail server
    Set Mailer.smtpserver = "**Server**"
}
FeedbackOpens in a new tab