• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Tomcat - Javamail don't send emails with attachments  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi I just wanted to ask for advice I am really thankful to those who can suggest any. Thanks in advance. I am trying to send an email with attachment it is working if I run it in desktop application netbeans maven however if it I run it in tomcat it will send with no error but if I check the email there is no attachment or the attachment is not sending correctly? if I run in netbeans main class it will send with attachment I didnt get any error in tomcat or netbeans

I dont receive attachment in email when run in tomcat I only recieve message below

------=_Part_0_1437359590.1537185365793--

but if I run in netbeans main class I will receive correct attachment I dont know why



code
 
Saloon Keeper
Posts: 4859
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turn on JavaMail's debug mode - it creates a lot more output that allows you to see what's going on under the hood: https://javaee.github.io/javamail/FAQ, section "Debugging".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!