aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes jsp email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "jsp email" Watch "jsp email" New topic
Author

jsp email

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Hi

I am new to javamail.

I want to send an email with attachment on webpage.

I have a web report page using jsp page. I want to send that webreport in any format with attachment and send as a email.


What is the best way to do it?

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42649
    
  65
If this was my problem, I'd look into generating a PDF from the report. Sending an HTML file with all images and CSS that go with it is kind of a mess. If you're generating XHTML styled with CSS then you could even use the FlyingSaucer library to convert it into a PDF. Or maybe the reporting package you're using creates PDFs to begin with.

Much material about JavaMail is linked in the JavaEnterpriseEditionFaq, including an extensive tutorial with many code examples; it covers attachments.


Ping & DNS - my free Android networking tools app
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
I'm working on send email's during nightly process. I have no idea, how to proceeed.

I have a webpage with daily date and year which genrates dynamically, when I select the date and year from the list on the webpage.On clicking of submit button it connects to the database and retreive the data and also displays the graphs uisng cewolf carts.


I have to send this webpage data and graphs as a email everynight?


Is that possible?

Can anyone please send me a similar example?


I need help on this.

Thanks.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

Sure it's possible. But you've got three separate questions there: (1) generating the graphs (2) sending an e-mail (3) doing it on a schedule. Which of those three things are you asking about?

And do try to keep the three things separate. It's easy to get confused if you lump all three things into the same problem-solving process.
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Hi,

Thanks for your reply.

I want to know about, how to send a webpage using jsp with charts /graphs as a email and scheule it as a daily process.


Could you please explain me the process and steps with simple example


Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

There isn't a "simple example" for that. As I explained before, there are three separate questions to be dealt with. I think you must not have read that post because you seem to have totally ignored it. I don't think there is any reason for people to answer your questions if you are not going to read the answers they post.
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Ok, thanks.


I want to know only about, how to send an email with charts/graphs on web page(jsp).


Thanks,


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

Okay. Since you didn't say, I'm going to assume you have already got these charts and graphs, and you just want to send them as attachments. So have a look at the JavaEnterpriseEditionFaq page; scroll down to the part about JavaMail. It has a lot of links to useful resources about JavaMail.
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Hi,

I am using cewolf charts on jsp page.

How would I send the cewolf charts as a attachment to the email?


Is it possible to send charts as a email?

I'm doing like below.I don't see the charts on the email.




thanks
 
Don't get me started about those stupid light bulbs.
 
subject: jsp email