   end
 
   if gen_smtp_major >= 1 do
-    defp attachment_content_params(:inline) do
+    defp attachment_content_params(:inline, filename) do
       %{
         content_type_params: [],
         disposition: "inline",
-        disposition_params: []
+        disposition_params: [{"filename", filename}]
       }
     end
   else
-    defp attachment_content_params(:inline) do
+    defp attachment_content_params(:inline, filename) do
       [
         {"content-type-params", []},
         {"disposition", "inline"},
-        {"disposition-params", []}
+        {"disposition-params", [{"filename", filename}]}
       ]
     end
   end

          format,
          [
            {"Content-Transfer-Encoding", "base64"},
            {"Content-Id", "<#{filename}>"}
            | custom_headers
          ],
          attachment_content_params(:inline),
          content
        }
    end

  defp prepare_headers(email) do
    []
    |> prepare_additional_headers(email)
    |> prepare_mime_version()
    |> prepare_reply_to(email)
    |> prepare_subject(email)
    |> prepare_bcc(email)
