<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yyama1556</author_name>
  <author_url>https://blog.hatena.ne.jp/yyama1556/</author_url>
  <blog_title>山崎屋の技術メモ</blog_title>
  <blog_url>https://www.shookuro.com/</blog_url>
  <categories>
    <anon>Java Tips</anon>
  </categories>
  <description>前回は単純なテキストメールの送信方法を紹介しました。www.shookuro.com今回は添付ファイル付きのメールを送りたいと思います。せっかくなので種類の違うプレーンテキストと PDF の 2 種類のファイルを添付したいと思います。maven の pom.xml の記載と「安全性の低いアプリのアクセス」の許可は前回の記事を参照してください。あとテキストファイル「テキスト.txt」と PDF ファイル「sample.pdf」を用意しておいてください。 package org.yyama; import java.io.File; import java.io.FileInputStream; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shookuro.com%2Fentry%2Fjava-mail-attachment&quot; title=&quot;【Java】添付ファイル付きメールを送る - 山崎屋の技術メモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yyama1556/20210508/20210508145312.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-05-08 14:56:52</published>
  <title>【Java】添付ファイル付きメールを送る</title>
  <type>rich</type>
  <url>https://www.shookuro.com/entry/java-mail-attachment</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
