attachmentとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > 日本語表現辞典 > attachmentの意味・解説 

attachment

別表記:アタッチメント

「attachment」とは、くっつけということ意味する表現

「attachment」とは・「attachment」の意味

「attachment」とは、「くっつける・取り付ける」を基本的な意味として持つ英単語で、「付着」「連結」「付属品」「留め具」「アクセサリー」といった直接的な意味のほか、基本語義発展させ、幅広い意味に派生する言葉である。日本語読み風にカタカナ表記すると「アタッチメント」となる。「attachment」は文法的に名詞用法限られており、動詞として「取り付ける」「添える」などの意味用い場合は「attach」を使う。

「attachment」を「付属品の意味用い場合は、一般的にアタッチメント」と表記し、主に家具家電、あるいは各種機械類付属して本体取り付け使用するものをさすことが多い。装着することで機能発揮する付属品は、どれも通称アタッチメント」である。

「attachment」はこのほかに、電子メール添付ファイルの意味を持つが、ビジネス公的な場などでやり取りされる契約書添付書類をさす用語としても「attachment」が使われ契約書本体同様に法的拘束力を持つ書類であることを示すものとなる。さらに「attachment」の法的拘束力直截的示されている訳語としては「差押え」がある。これは強制執行の一形態で、債権者権利として、債務者所有財産競売にかけるなどの措置可能にするものであり、差押え実行は「execution of attachment」などという。

愛情愛着」を意味する「attachment」は、主に心理学用語として使われることが多く子どもの発達段階では、子どもがある特定の人にだけ示す情緒的な結びつきのことを意味する抱っこをせがむ子どもの心理は「attachment」が如実に行動表れたのであるが、その対象は、母親父親父母以外の人という順番変化するのが一般的であるとされる

「attachment」の略語

「attachment」の略語は「att」で、「添付書類」などを「att」と略語で示す。

「attachment」の語源・由来

「attachment」の語源は、9世紀から14世紀にかけてフランス北部中心に使用されていた古期フランス語で、「付ける」を意味する「atachier」である。

「attachment」を含む英熟語・英語表現

「form attachment」とは


form attachment」の「form」とは、「(ものごとを)形づくる」「(組織などを)設立する」ことを意味する動詞である。すなわち「form attachment」とは、「アタッチメント形成する」となり、「アタッチメント」の部分文脈によって「つながり」「愛情」などという意味に変わって適宜つながり作る」「愛情形成する」などのように訳される

「attachment to」とは


「attachment to」の「to」は、対象を示す前置詞で「~に対して」という意味となる。すなわち「attachment to」は「(対象への)取り付け」や「(対象への)愛着」という意味となり、「to」以下に述べられている内容がその対象となる。

「in the attachment」とは


「in the attachment」とは、「アタッチメント中に」という意味である。「アタッチメント」の部分文脈によって変化するが、メール添付物をさしていうケース多く、「Please see the details in the attachment.(詳細添付ファイルご参照ください)」などのように用いことがある

「attachment」の使い方・例文

「attachment」の使い方例文としては、「付属品」などの意味として「I mailed him the machine attachments.(私は彼に機械付属品郵送した)」「This vacuum has many attachments that clean in different ways.(この掃除機には異な方法掃除する付属品がたくさついている)」などの例文挙げられる」。

メールなどの「添付物」の意味では、「The details of the price estimation will be sent to you in an email attachment.(見積もり内訳添付ファイル君に連絡する)」「They are making a standard book attachment.(彼らは添付標準書を作成している)」などと使われる

「attachment」を「愛情」「執着」などの意味用い場合は、「His attachment to his old home is very great.(以前住んでいた家に対す彼の愛着はとても強い)」「I have no attachment whatever to my present position.(私は現在の地位何ら執着していない)」などの例文挙げることができる。

アタッチメント

英語:attachment

「アタッチメント」の基本的な意味

「アタッチメント」は、機械付属装置器具付属部品を指す言葉であり、発達心理学分野では愛着意味する言葉としても使用される付属装置付属部としてのアタッチメントは、種類非常に豊富である。本来は対応しない機械同士接続させたり、機械異な機能持たせたりするなど、目的多種多様だマスク着用した時の通気性高めたり歯科矯正治療を行う際、矯正器具と歯を固定するために使用したりするアタッチメントもある。

アタッチメントに似た言葉としては、「アクセサリー」が挙げられる。アタッチメントと同様に機械器具装着する装置部品を指す言葉だが、装着することで機械器具機能増えるとは限らない。それに対して装着する機能増えるものが、アタッチメントである。

愛着という意味のアタッチメントは、保育者乳幼児の間に生まれる、情緒的な絆を指す。保育者は特に限定されていないが、母親である場合が多い。乳幼児は、特定の人が自らの世話繰り返し行ってくれることで、その人が他の人とは異な保育者であると認識する。そして、保育者との絆、アタッチメントを深めていく。

アタッチメントがあることで、子どもは保育者信頼できるうになる。そうして、人と接することの重要さ自然と理解していく。また、保育者相手コミュニケーション能力を育んだり、保育者安全な所を作り出してくれることで、安心感得たりもする。幼少期に、人と接することを知ったり、コミュニケーション能力身に付けたり、安心感得られたりすることは、人が健全に成長する上で非常に重要である。その根幹となるのが愛着、アタッチメントだ。

もし、成長する過程でアタッチメントが不足していたら、人間不信陥ったり、人との距離感がわからなかったり、自傷行為行ったりする恐れがあるそのような、アタッチメント不足によって、情緒対人関係問題が出ることは、しばしば愛着障害やアタッチメント障害呼ばれる

「アタッチメント」の語源・由来

「アタッチメント」の元になっているのは、「取り付ける」「愛着覚えさせる」という意味の英単語attach」である。「attach」を名詞化したものが、「attachment(アタッチメント)」だ。

「アタッチメント(ブランド)」とは

「アタッチメント」は、1999年誕生したファッションブランドである。メンズターゲットであり、コートシャツパンツなど、幅広い服を提供している。ブランド名は、服はあくまでも、人の付属品であるという考え由来となっている。そのため、人の個性奪ってしまうような、大量装飾施された服はほとんどない。アタッチメントは、世界的に店舗展開していて、日本にも東京中心に複数店舗構えている。ただ、店舗に足を運ばなければアタッチメントの服が手に入らないわけではなくオンライン通販購入することも可能だ

「アタッチメント」を含む様々な用語の解説

アタッチメントロスとは


「アタッチメントロス」は、歯科使用される専門用語であり、歯に付着している歯肉離れることを指す。主に歯周炎によって発生するため、歯周病進行具合指標にされる。

アタッチメントレベルとは


「アタッチメントレベル」は、歯科使用される専門用語であり、歯に付着している歯肉長さ確かめるためのものだ。具体的には、歯と歯茎の間にある歯周ポケットの底から、歯のエナメル質セメント質境目までの長さが、アタッチメントレベルである。アタッチメントレベルを複数測定し数値増加していた場合その分アタッチメントロスが増えたということになる。

アタッチメント理論とは


アタッチメント理論は、心理学者であるジョン・ボウルビィによって確立された、愛着、アタッチメントに関する理論である。人が健全に成長するためには、保育者とのアタッチメントが重要であり、アタッチメントが不足すると、問題起こす恐れがあるという考え方は、アタッチメント理論基づいている。

「アタッチメント」の使い方・例文

付属装置付属器具を指す場合
「この機械で高硬度素材穴を開けるであれば専用のアタッチメントが必要である」
「アタッチメントが破損したため、この機械休止状態となっている」
「このマスクのアタッチメントは、私には合わなかったようだ
矯正器具のアタッチメント調整を行うために、今日歯科へ行く」

愛着という意味で使用する場合
彼に問題行動が多いのは、幼少期のアタッチメント不足が原因かもしれない
「あの講座では、アタッチメントがテーマとして取り上げられている」
乳幼児対象にした、アタッチメントテストを実施する
現代には、アタッチメントの重要性理解している親が大勢いる」

アタッチメント【attachment】

読み方:あたっちめんと

器具機械類付属装置カメラ補助レンズミシン付属品など。

コンピューターで、添付ファイルのこと。

発達心理学などで、母親と子の間に形成される愛情多く愛着」と訳される

「アタッチメント」に似た言葉

Attachment クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

電子メール添付するデータ表します

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

Public Class Attachment
    Inherits AttachmentBase
public class Attachment : AttachmentBase
public ref class Attachment : public
 AttachmentBase
public class Attachment extends AttachmentBase
public class Attachment extends
 AttachmentBase
解説解説

Attachment クラスは、MailMessage クラスと共に使用されます。すべてのメッセージには、メッセージ内容格納している Body含まれます。本文加えて追加ファイル送信することもできます。これらは添付データとして送信されAttachmentインスタンスとして表されます。添付データ電子メール メッセージ追加するには、そのファイルを MailMessage.Attachments コレクション追加します

添付データ内容には、StringStream、またはファイル名指定できます添付データ内容は、いずれかの Attachment コンストラクタ使用して指定できます

添付データMIMEContent-Type ヘッダー情報は、ContentType プロパティによって表されます。Content-Type ヘッダーでは、メディア タイプサブタイプ、および関連付けられたパラメータ指定します添付データ関連付けられているインスタンス取得するには、ContentType使用します

MIME の Content-Disposition ヘッダーは、ContentDisposition プロパティによって表されます。Content-Disposition ヘッダーでは、添付データ表示方法ファイルタイム スタンプ指定します。Content-Disposition ヘッダーは、添付データファイル場合にだけ送信されます。添付データ関連付けられているインスタンス取得するには、ContentDisposition プロパティ使用します

MIMEContent-Transfer-Encoding ヘッダーは、TransferEncoding プロパティによって表されます。

使用例使用例

電子メール メッセージファイル添付するコード例次に示します

public static void CreateMessageWithAttachment(string
 server)
{
    // Specify the file to be attached and sent.
    // This example assumes that a file named Data.xls exists in the
    // current working directory.
    string file = "data.xls";
    // Create a message and set up the recipients.
    MailMessage message = new MailMessage(
       "jane@contoso.com",
       "ben@contoso.com",
       "Quarterly data report.",
       "See the attached spreadsheet.");

    // Create  the file attachment for this e-mail message.
    Attachment data = new Attachment(file, MediaTypeNames.Application.Octet);
    // Add time stamp information for the file.
    ContentDisposition disposition = data.ContentDisposition;
    disposition.CreationDate = System.IO.File.GetCreationTime(file);
    disposition.ModificationDate = System.IO.File.GetLastWriteTime(file);
    disposition.ReadDate = System.IO.File.GetLastAccessTime(file);
    // Add the file attachment to this e-mail message.
    message.Attachments.Add(data);
    //Send the message.
    SmtpClient client = new SmtpClient(server);
    // Add credentials if the SMTP server requires them.
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    // Display the values in the ContentDisposition for the attachment.
    ContentDisposition cd = data.ContentDisposition;
    Console.WriteLine("Content disposition");
    Console.WriteLine(cd.ToString());
    Console.WriteLine("File {0}", cd.FileName);
    Console.WriteLine("Size {0}", cd.Size);
    Console.WriteLine("Creation {0}", cd.CreationDate);
    Console.WriteLine("Modification {0}", cd.ModificationDate);
    Console.WriteLine("Read {0}", cd.ReadDate);
    Console.WriteLine("Inline {0}", cd.Inline);
    Console.WriteLine("Parameters: {0}", cd.Parameters.Count);
    foreach (DictionaryEntry d in cd.Parameters)
    {
        Console.WriteLine("{0} = {1}", d.Key, d.Value);
    }
    data.Dispose();
}
継承階層継承階層
System.Object
   System.Net.Mail.AttachmentBase
    System.Net.Mail.Attachment
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

コンテンツ文字列指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

ArgumentNullException

fileNamenull 参照 (Visual Basic では Nothing) です。

ArgumentException

fileName が空です。

解説解説
使用例使用例

このコンストラクタ呼び出す方法次のコード例示します

public static void CreateMessageInlineAttachment2(string
 server, string
textMessage)
{
    // Create a message and set up the recipients.
    MailMessage message = new MailMessage(
       "jane@contoso.com",
       "ben@contoso.com",
       "A text message for you.",
       "Message: ");

    // Attach the message string to this e-mail message.
    Attachment data = new Attachment(textMessage);
    // Send textMessage as part of the e-mail body.
    message.Attachments.Add(data);
    ContentType content = data.ContentType;
    content.MediaType = MediaTypeNames.Text.Plain;
    //Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (Stream, String, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

ストリーム、名前、および MIME タイプ情報指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    contentStream As Stream, _
    name As String, _
    mediaType As String _
)
Dim contentStream As Stream
Dim name As String
Dim mediaType As String

Dim instance As New Attachment(contentStream,
 name, mediaType)
public Attachment (
    Stream contentStream,
    string name,
    string mediaType
)
public:
Attachment (
    Stream^ contentStream, 
    String^ name, 
    String^ mediaType
)
public Attachment (
    Stream contentStream, 
    String name, 
    String mediaType
)
public function Attachment (
    contentStream : Stream, 
    name : String, 
    mediaType : String
)

パラメータ

contentStream

この添付内容格納している読み取り可能な Stream

name

この添付データ関連付けられている ContentTypeName プロパティの値を格納している String。この値は、null 参照 (Visual Basic では Nothing) の場合あります

mediaType

この添付データMIME コンテンツ ヘッダー情報格納している String。この値は、null 参照 (Visual Basic では Nothing) の場合あります

例外例外
例外種類条件

ArgumentNullException

streamnull 参照 (Visual Basic では Nothing) です。

FormatException

mediaType形式正しくありません。

解説解説

mediaTypenull 参照 (Visual Basic では Nothing) でないか、String.Empty ("") と等し場合は、この添付データ関連付けられた ContentType クラス構築使用されます。

mediaTypename両方Name 情報格納されている場合name指定された値が使用されます。TransferEncoding プロパティBase64設定されています。

ストリームの CanSeek プロパティfalse場合添付データとそのデータ格納している MailMessage は再利用できません。添付データ再利用するには、検索できるストリーム指定する必要があります

使用例使用例

このコンストラクタ呼び出す方法次のコード例示します

// The following example sends a summary of a log file as the message
// and the log as an e-mail attachment.
public static void SendNamedAndTypedErrorLog(string
 server, string recipientList)
{
    // Create a message from logMailer@contoso.com to recipientList.
    MailMessage message = new MailMessage(
       "logMailer@contoso.com", recipientList);

    message.Subject = "Error Log report";
    string fileName = "log.txt";
    // Get the file stream for the error log.
    // Requires the System.IO namespace.
    FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    StreamReader s = new StreamReader(fs);
    int errors = 0;
    while (s.ReadLine() != null)
    {
        // Process each line from the log file here.
        errors++;
    }
    // The e-mail message summarizes the data found in the log.
    message.Body = String.Format("{0} errors in log as of
 {1}",
        errors, DateTime.Now);
    // Close the stream reader. This also closes the file.
    s.Close();
    // Re-open the file at the beginning to make the attachment.
    fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    // Create a name for the log data file.
    string name = "log" + DateTime.Now.ToString() +
 ".txt";
    // Create the attachment, name it, and specify the MIME type.
    Attachment data = new Attachment(fs, name, MediaTypeNames.Text.Plain);
    // Add the attachment to the message.
    message.Attachments.Add(data);
    // Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
    // Close the log file.
    fs.Close();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (Stream, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

ストリームと名前を指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    contentStream As Stream, _
    name As String _
)
Dim contentStream As Stream
Dim name As String

Dim instance As New Attachment(contentStream,
 name)
public Attachment (
    Stream contentStream,
    string name
)
public:
Attachment (
    Stream^ contentStream, 
    String^ name
)
public Attachment (
    Stream contentStream, 
    String name
)
public function Attachment (
    contentStream : Stream, 
    name : String
)

パラメータ

contentStream

この添付内容格納している読み取り可能な Stream

name

この添付データ関連付けられている ContentTypeName プロパティの値を格納している String。この値は、null 参照 (Visual Basic では Nothing) の場合あります

例外例外
例外種類条件

ArgumentNullException

contentStreamnull 参照 (Visual Basic では Nothing) です。

解説解説

namenull 参照 (Visual Basic では Nothing) でないか、String.Empty ("") と等し場合、この添付データContentTypename設定されている Name プロパティ使用して生成されます。TransferEncoding プロパティBase64設定されています。

ストリームの CanSeek プロパティfalse場合添付データとそのデータ格納している MailMessage は再利用できません。添付データ再利用するには、検索できるストリーム指定する必要があります

使用例使用例

このコンストラクタ呼び出す方法次のコード例示します

// The following example sends a summary of a log file as the message
// and the log as an e-mail attachment.
public static void SendNamedErrorLog(string
 server, string recipientList)
{
    // Create a message from logMailer@contoso.com to recipientList.
    MailMessage message = new MailMessage(
       "logMailer@contoso.com", recipientList);

    message.Subject = "Error Log report";
    string fileName = "log.txt";
    // Get the file stream for the error log.
    // Requires the System.IO namespace.
    FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    StreamReader s = new StreamReader(fs);
    int errors = 0;
    while (s.ReadLine() != null)
    {
        // Process each line from the log file here.
        errors++;
    }
    // The e-mail message summarizes the data found in the log.
    message.Body = String.Format("{0} errors in log as of
 {1}",
        errors, DateTime.Now);
    // Close the stream reader. This also closes the file.
    s.Close();
    // Re-open the file at the beginning to make the attachment.
    fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    // Make a ContentType indicating that the log data
    // that is attached is plain text and is named.
    ContentType ct = new ContentType();
    ct.MediaType = MediaTypeNames.Text.Plain;
    ct.Name = "log" + DateTime.Now.ToString() + ".txt";
    // Create the attachment.
    Attachment data = new Attachment(fs, ct);
    // Add the attachment to the message.
    message.Attachments.Add(data);
    // Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
    // Close the log file.
    fs.Close();
    return;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (String, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

コンテンツ文字列MIME タイプ情報指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

ArgumentNullException

fileNamenull 参照 (Visual Basic では Nothing) です。

FormatException

mediaType形式正しくありません。

解説解説

mediaTypenull 参照 (Visual Basic では Nothing) か、または String.Empty ("") と等し場合、この添付データMediaType プロパティPlain設定されます。mediaTypenull 参照 (Visual Basic では Nothing) でなく、長さが 0 の文字列でもない場合は、この添付データ関連付けられた ContentType生成使用されます。

使用例使用例

このコンストラクタ呼び出す方法次のコード例示します

public static void CreateMessageInlineAttachment(string
 server, string
textMessage)
{
    // Create a message and set up the recipients.
    MailMessage message = new MailMessage(
       "jane@contoso.com",
       "ben@contoso.com",
       "An inline text message for you.",
       "Message: ");

    // Attach the message string to this e-mail message.
    Attachment data = new Attachment(textMessage, MediaTypeNames.Text.Plain);
    // Send textMessage as part of the e-mail body.
    message.Attachments.Add(data);
    ContentDisposition disposition = data.ContentDisposition;
    disposition.Inline = true;
    //Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (Stream, ContentType)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

ストリームコンテンツ タイプ指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    contentStream As Stream, _
    contentType As ContentType _
)
Dim contentStream As Stream
Dim contentType As ContentType

Dim instance As New Attachment(contentStream,
 contentType)
public Attachment (
    Stream contentStream,
    ContentType contentType
)
public:
Attachment (
    Stream^ contentStream, 
    ContentType^ contentType
)
public Attachment (
    Stream contentStream, 
    ContentType contentType
)
public function Attachment (
    contentStream : Stream, 
    contentType : ContentType
)

パラメータ

contentStream

この添付内容格納している読み取り可能な Stream

contentType

stream 内のデータ説明する ContentType

例外例外
例外種類条件

ArgumentNullException

contentTypenull 参照 (Visual Basic では Nothing) です。

または

contentStreamnull 参照 (Visual Basic では Nothing) です。

解説解説

TransferEncoding プロパティBase64設定されています。

ストリームの CanSeek プロパティfalse場合添付データとそのデータ格納している MailMessage は再利用できません。添付データ再利用するには、検索できるストリーム指定する必要があります

使用例使用例

このコンストラクタ呼び出す方法次のコード例示します

// The following example sends a summary of a log file as the message
// and the log as an e-mail attachment.
public static void SendErrorLog(string
 server, string recipientList)
{
    // Create a message from logMailer@contoso.com to recipientList.
    MailMessage message = new MailMessage(
       "logMailer@contoso.com", recipientList);

    message.Subject = "Error Log report";
    string fileName = "log.txt";
    // Get the file stream for the error log.
    // Requires the System.IO namespace.
    FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    StreamReader s = new StreamReader(fs);
    int errors = 0;
    while (s.ReadLine() != null)
    {
        // Process each line from the log file here.
        errors++;
    }
    // The e-mail message summarizes the data found in the log.
    message.Body = String.Format("{0} errors in log as of
 {1}",
        errors, DateTime.Now);
    // Close the stream reader. This also closes the file.
    s.Close();
    // Re-open the file at the beginning to make the attachment.
    fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
    // Make a contentType indicating that the log data
    // that is attached is plain text.
    ContentType ct = new ContentType(MediaTypeNames.Text.Plain);
    // Attach the log file stream to the e-mail message.
    Attachment data = new Attachment(fs, ct);
    ContentDisposition disposition = data.ContentDisposition;
    // Suggest a file name for the attachment.
    disposition.FileName = "log" + DateTime.Now.ToString() + ".txt";
    // Add the attachment to the message.
    message.Attachments.Add(data);
    // Send the message.
    // Include credentials if the server requires them.
    SmtpClient client = new SmtpClient(server);
    client.Credentials = CredentialCache.DefaultNetworkCredentials;
    client.Send(message);
    data.Dispose();
    // Close the log file.
    fs.Close();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ (String, ContentType)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

コンテンツ文字列ContentType指定して、Attachment クラス新しインスタンス初期化します。

名前空間: System.Net.Mail
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

ArgumentNullException

fileNamenull 参照 (Visual Basic では Nothing) です。

ArgumentException

mediaType形式正しくありません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Attachment クラス
Attachment メンバ
System.Net.Mail 名前空間

Attachment コンストラクタ


Attachment プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ ContentDisposition この添付データMIME コンテンツ配置取得します
パブリック プロパティ ContentId  この添付データMIME コンテンツ ID取得または設定します。 ( AttachmentBase から継承されます。)
パブリック プロパティ ContentStream  この添付データコンテンツ ストリーム取得します。 ( AttachmentBase から継承されます。)
パブリック プロパティ ContentType  この添付データコンテンツ タイプ取得します。 ( AttachmentBase から継承されます。)
パブリック プロパティ Name この添付データ関連付けられているコンテンツ タイプMIME コンテンツ タイプ名の値を取得または設定します
パブリック プロパティ NameEncoding Attachment Nameエンコーディング指定します
パブリック プロパティ TransferEncoding  この添付データエンコーディング取得または設定します。 ( AttachmentBase から継承されます。)
参照参照

関連項目

Attachment クラス
System.Net.Mail 名前空間

Attachment メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

Attachment クラス
System.Net.Mail 名前空間

Attachment メンバ

電子メール添付するデータ表します

Attachment データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

Attachment クラス
System.Net.Mail 名前空間

アタッチメント

(attachment から転送)

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/09/01 07:27 UTC 版)

アタッチメント(attachment)




「アタッチメント」の続きの解説一覧


英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「attachment」の関連用語

attachmentのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



attachmentのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
実用日本語表現辞典実用日本語表現辞典
Copyright © 2024実用日本語表現辞典 All Rights Reserved.
デジタル大辞泉デジタル大辞泉
(C)Shogakukan Inc.
株式会社 小学館
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.
ウィキペディアウィキペディア
All text is available under the terms of the GNU Free Documentation License.
この記事は、ウィキペディアのアタッチメント (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。 Weblio辞書に掲載されているウィキペディアの記事も、全てGNU Free Documentation Licenseの元に提供されております。

©2024 GRAS Group, Inc.RSS