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

What is the best way to parse SOAP response in Java
How to change the language of Google Speech API on Java?
Android - Play a song that is still downloading
Spring Boot Hibernate loading but not saving data from an Event Listener
Adding .lproj directories to .dmg installers with javapackager
Get Text from SVG selenium java
How to configure Redis caching in Spring Boot?
YAWL services and Business Logic
Selenium IE driver can not find newly opened window
android - java.lang.NoClassDefFoundError On RealmRecycle View
Android: Layout is broken after return from fullscreen activity
Retrofit2 java.lang.NoClassDefFoundError: okhttp3/Call$Factory in JAVA
How to use replaceFirst() to get a series of sequential strings in my case?
Java Testing for Maps
I just started using methods. This is a template and I'm confused on how to do the methods. Can someone show me how to do what is being asked?
Find out double arithmetic operations in my java code

Categories

HOME
cakephp
vim
asp.net-core
netsuite
netbeans
urbancode
oracle11g
comparison
grep
bpmn
octobercms
maven-3
paw-app
rdf
twitter-bootstrap-4
onelogin
indesign
virtualization
basic
gorm
gz
flask-wtforms
msp430
after-effects
reactive-cocoa
firefox-webextensions
riot.js
crystal-reports-2010
emgucv
fluentvalidation
buck
google-rich-snippets
frame
junit5
gtrendsr
phpfreechat
language-concepts
http-referer
mapdb
hockeyapp
vapor
mapzen
eclipse-scout
google-closure
http-live-streaming
glew
netcdf4
wso2carbon
dotcover
zip4j
hendrix
jlink
togetherjs
nstextview
diagnostics
jspdf-autotable
vtigercrm
crosswalk-runtime
time-and-attendance
httplistener
log4c
merge-conflict-resolution
markojs
master-slave
apachebench
photobucket
wso2cloud
simple-framework
purge
tarjans-algorithm
muse
ideamart
graph-drawing
cisco-ios
kineticjs
relocation
client-side-templating
terminfo
castle
ceil
article
fluentautomation
hippomocks
resty-gwt
intentservice
oam
dir
dexterity
tidy
quartz-graphics
ftps
tws
limejs
html-editor
robotics-studio
specification-pattern
path-separator
quickdialog
regsvr32
ohm
code-cleanup
deobfuscation
asp.net-mvc-areas
asp.net-profiles
libs
data-driven

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