メール(grails)にCSVファイルを添付したいメールにCSVを添付する
パス内のファイルはすでに存在しています。私は次のコードを使用しています
sendMail {
multipart true
from "$senderName <$fromAddress>"
to toAddress
cc message.cc
subject message.subject
body content.plaintext
html content.html
attachBytes './web-app/ReadyOrdersFor-${vendor.name}','text/csv', new File('./web-app/ReadyOrdersFor-${vendor.name}').readBytes()
}
エラーが表示されます。
java.io.FileNotFoundException:./web-app/ReadyOrdersFor-${vendor.name}.csv(そのようなファイルまたはディレクトリ)
どちらもこれは同じエラーに
attachBytes './web-app/ReadyOrdersFor-${vendor.name}.csv','text/csv'、新しいファイル( './ web-app/ReadyOrdersFor- $ {vendor.name} .csv') .readBytes()
このファイルが指定されたパスに存在していますか? –