aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes sending 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 "sending email" Watch "sending email" New topic
Author

sending email

rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
I am using java in my project .I have created a pdf in web browser after clicking a button but also want that after clicking this button this pdf is also sent to a particular person'mail id......what are the requirements for this.....which jar files and which mail server is used for this to send the pdf to email address
Mohan Prasath
Ranch Hand

Joined: Jul 25, 2011
Posts: 38

You can use Java Mail API. For more Details, Java Mail and for Examples, Rose India


With regards,
Mohan Prasath
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Mohan Prasath wrote:You can use Java Mail API. For more Details, Java Mail and for Examples, Rose India


I have added java mail but what should I write in place of host.and i am not getting how this is done using tomcat server
Mohan Prasath
Ranch Hand

Joined: Jul 25, 2011
Posts: 38

May be this link will help you. Yahoo Answers
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Mohan Prasath wrote:May be this link will help you. Yahoo Answers


is there any other example regarding the sending of mail in someone's mail id using servlet in tomcat sever .because i dont understand that what changes in server should i follow (port number,username,etc).suppose i have generated pdf now i want that pdf to my gmail id so what should i do???

http://james.apache.org/download.cgi
this link is not opened so i not able to try the example given in rose india....
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
The James download link works fine for me; check your network connection. And yes, you need some kind of email server. If you don't have one already, check with your sys admin for how to use your company's server.
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Tim Moores wrote:The James download link works fine for me; check your network connection. And yes, you need some kind of email server. If you don't have one already, check with your sys admin for how to use your company's server.


actually i am doing a project at college level....so can you please tell me which test server(freely available to install sothat i can send the email) is useful for me to test the email sending
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
There are no free public mail servers. You will need to install a local one, like James. If you're using Unix/Linux then sendmail is likely available on your system already.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

rakhi sinha wrote:
Tim Moores wrote:The James download link works fine for me; check your network connection. And yes, you need some kind of email server. If you don't have one already, check with your sys admin for how to use your company's server.


actually i am doing a project at college level....so can you please tell me which test server(freely available to install sothat i can send the email) is useful for me to test the email sending


Your school almost certainly has its own mail server. Assuming that it is set up so that students can send mail via the university network, then you should be able to use it with your application. All you need to know is its domain name or IP address, SMTP port number (it's almost always 25 for unencrypted mail), and possibly userid/password needed to connect.

If you have a personal (home) Internet service, your ISP will almost certainly have an email server, and you would configure the JavaMail request with the same data that they provided you with as part of your ability to send mail from your regular mail client (MS Outlook, Evolution, Thunderbird or whatever).


Customer surveys are for companies who didn't pay proper attention to begin with.
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Tim Holloway wrote:
rakhi sinha wrote:
Tim Moores wrote:The James download link works fine for me; check your network connection. And yes, you need some kind of email server. If you don't have one already, check with your sys admin for how to use your company's server.


actually i am doing a project at college level....so can you please tell me which test server(freely available to install sothat i can send the email) is useful for me to test the email sending


Your school almost certainly has its own mail server. Assuming that it is set up so that students can send mail via the university network, then you should be able to use it with your application. All you need to know is its domain name or IP address, SMTP port number (it's almost always 25 for unencrypted mail), and possibly userid/password needed to connect.

If you have a personal (home) Internet service, your ISP will almost certainly have an email server, and you would configure the JavaMail request with the same data that they provided you with as part of your ability to send mail from your regular mail client (MS Outlook, Evolution, Thunderbird or whatever).


If i want to do it on my laptop on which i am having net connection then ...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

rakhi sinha wrote:
If i want to do it on my laptop on which i am having net connection then ...


... it all depends on where you are getting your net connection from.

If it's a public WiFi spot, they may not be providing a mail server, since that would offer spammers a "hit-and-run" entry point. But if it's a private account, you almost certainly will have a mailbox and related resources.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1001
    
    2
you can send emails with your gmail account.
try this:
send email
 
 
subject: sending email