Solved

send email with attachment

Posted on 2004-08-24
7
194 Views
Last Modified: 2013-11-24
Hi!
I know how to send email with attachments (where the attachment are based on phisical files)
I have a byte array that represents a file and I want to send it as attachment.
Can you show me how to do it without creating a temporary file?
Thanks!
0
Comment
Question by:rzvika2
  • 4
  • 2
7 Comments
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
Can't you use a ByteArrayDataSource instead of FileDataSource, to wrap your attachment?
0
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
Comment Utility
0
 

Expert Comment

by:navotv
Comment Utility
javaWorld geting start with JavaMail it's a good article and have many examples
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 35

Expert Comment

by:TimYates
Comment Utility
BTW:  ByteArrayDataSource is in the examples directory that came with javamail (apparently) ;-)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>• You may not collaborate on this question

?! Why not?
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
Where did you get that from?

Another window? ;-)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
No the one i posted into! It went after i posted - probably a bug ;-)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now