java


File not attaching using play framework play mailer plugin


We are using the below plugin for sending e-mails within our Play application. The sending e-mail part works perfectly OK but when I add an attachment, I am running into the below error which indicates the file is not present. Though I am 100% sure the file is present on my disk and also later it passes my vaidation test in code as well
Adding attachment in code
email.addAttachment(fileName,new File ("path"))
https://github.com/playframework/play-mailer
Error stack :
2017-05-15 20:37:15,870 [ERROR] from application in application-akka.actor.default-dispatcher-10 - org.apache.commons.mail.EmailException: Cannot attach file "/tmp/playtemp7007305302758557514/multipartBody5483238492998817693asTemporaryFile"
at org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:334)
at play.api.libs.mailer.CommonsMailer.play$api$libs$mailer$CommonsMailer$$handleAttachmentFile(MailerPlugin.scala:251)
at play.api.libs.mailer.CommonsMailer$$anonfun$createEmail$10.apply(MailerPlugin.scala:150)
at play.api.libs.mailer.CommonsMailer$$anonfun$createEmail$10.apply(MailerPlugin.scala:146)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at play.api.libs.mailer.CommonsMailer.createEmail(MailerPlugin.scala:146)
at play.api.libs.mailer.CommonsMailer.send(MailerPlugin.scala:130)
at play.api.libs.mailer.SMTPMailer.send(MailerPlugin.scala:110)
at play.api.libs.mailer.SMTPDynamicMailer.send(MailerPlugin.scala:117)
at play.api.libs.mailer.MailerClient$class.send(MailerPlugin.scala:56)
at play.api.libs.mailer.SMTPDynamicMailer.send(MailerPlugin.scala:114)


Related Links

log to separate files using logback and apache camel routes
jersey error handling + generics response object
Sorting three arrays using third array as pivot
Save content of ArrayList to external storage
Fetch primary key generated by sequence using jdbctemplate / jdbc
Where can i find the maven dependencies for Webshpere eXtreme Scale?
onQueryTextSubmit brings to relaunching MainActivity
Dynamically create multiple ImageViews
ProgressBar working on emulator and not on phones
osgi.dev Property in eclipse 4.5
Apache FOP - Table component getting misaligned from second page onwards
How to measure the performance speed of one method in java [duplicate]
How to resolve IllegalStateException: Failed to load ApplicationContext
Expires header and page stay blank
Libgdx | How to create a splash screen?
how to put cursor content in textview

Categories

HOME
twitter
openlayers
testng
proxy
youtube-dl
rsyslog
programming-languages
infragistics
malloc
cakephp-2.5
windows-server
networkx
awesome-wm
windows-10-universal
imacros
decimal
iolanguage
foselasticabundle
windows-7-x64
ef-migrations
http-status-code-504
dbext
cx-freeze
java-3d
riot.js
realex-payments-api
hammerspoon
shopware
bootstrap-duallistbox
nhapi
windows-error-reporting
strncpy
typo3-6.2.x
ejabberd-module
subdomains
gsmcomm
skia
nameservers
binary-data
uisplitview
kendo-ui-grid
pim
xmlreader
adobe-premiere
lto
hot-module-replacement
mixture-model
dynamics-crm-2013
withings
reportingservices-2005
jvm-languages
nomethoderror
sas-jmp
google-datalayer
taffy
rainbowtable
chain-builder
paxos
domain-model
powercli
drupal-6
np-complete
namecoin
qtwebview
sqldf
background-service
google-feed-api
python-stackless
captivenetwork
bluemix-app-scan
wapiti
natvis
rtbkit
xna-4.0
r-tree
cannon.js
feedback
cakephp-3.1
responsive-images
sortedlist
terminfo
valuechangelistener
pyhdf
multiprocessor
inbox
interface-orientation
isnullorempty
bluepill
pysimplesoap
multipage
qtkit
bigcouch
spyware
web-application-design
infrastructure
vc90
web-architecture
grid-system
3gp





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm