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

Catch an excception in hibernate method
lock workstation using applet from jsp
Mocking a concrete class in junit 3
error parsing date
quartz can't release file handle
How to calculate a signature with EVP_Sign functions
resultset isn't going into while loop and set the value
HTML to Java characters changes
My login system doesn't compare correctly [duplicate]
BindingResult rejectValue for Map field of form backing object
Import SwingX jar library in eclipse
Incompatible types (boolean/string)
Java, Android: Activity not found exception when exporting
Logging standard for utility library
Is it possible to find out if a value exists twice in an arraylist?
unable to retrieve cookie value using jsp

Categories

HOME
ms-access
vim
mfc
path-finding
raspberry-pi
iot
yahoo-oauth
blueprintjs
ojdbc
rascal
modx-revolution
google-apps-marketplace
lombok
seaborn
lucene.net
textfield
jprofiler
custom-wordpress-pages
swiftlint
riot.js
sylius
angular2-aot
javacv
uninstall
greendao
elasticsearch-net
compatibility
skia
fabric8
bcd
uisplitview
data-manipulation
airconsole
textmate
uiswipegesturerecognizer
android-kernel
gammu
sequential
nssegmentedcontrol
fusionpbx
overlap
grid.mvc
elmah
checkboxlist
node-sass
jsch
avconv
outlook-2013
komodoedit
prolog-setof
veracode
mplayer
forever
windows-mobile-6.5
akka-cluster
pdfclown
imanage
minimization
pcf
skobbler-maps
firebaseui
websitepanel
blackberry-10
make-install
dlna
ptrace
wapiti
r-tree
marching-cubes
content-length
iis-arr
drawbitmap
createprocessasuser
clicktag
tablelayout
mdt
bitcoinj
elliptic-curve
wp-query
system.net.webexception
doskey
meteor-velocity
message-driven-bean
algebraic-data-types
qt-faststart
cassini-dev
e4x
hamiltonian-cycle
dice
objective-c-2.0
ticoredatasync
windows-phone-7.1.1
jquery-ui-layout
gwt-ext
qt-jambi
doh
iphone-web-app
datareader
dmx512
microsoft-virtualization
ctp4
rtml

Resources

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
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App