1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

メール送信で添付ファイルに空ファイルが付いてしまった時の覚書

Posted at

ネットで調べつつ実装して少しハマったので、覚書として残しておきます

前提

  • mb_send_mail()で自前でheaderとbodyを整形してメール送信している
  • 添付ファイル付きでメール送信している
  • 中身が空の添付ファイルが最後に付く

結論

bodyの最終行のboundary文字列末尾に--を付けてなかった

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?