Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java Mail or qMail

Posted on 2002-06-07
4
Medium Priority
?
364 Views
Last Modified: 2010-04-01
I have to make a mail application in JSP, What should I use to send mails - Java Mail or qmail(unix)? Which one is better and why? I can develop my application either on Unix platform or on Windows that is not a problem.

0
Comment
Question by:super_quest
  • 4
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 total points
ID: 7062336
Don't use the sun's smtp package.. that is not supported any more.

basic code btw:
<%@ page import="java.util.Properties,javax.mail.*,javax.mail.internet.*,java.io.*" %>

<%
      Properties p = System.getProperties();
      p.put("mail.host", Host);

      MimeMessage message = new MimeMessage(Session.getInstance(p, null));
      message.setFrom(new InternetAddress("me@mysite.com"));
      message.setRecipients(Message.RecipientType.TO,
      InternetAddress.parse("you@yoursite.com"));
      message.setSubject("test email subject");
      message.setText("test email text");

      Transport.send(message);
%>

HTH,
CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7075681
any updates?

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7078581
Glad I could help and Thanx for the "A".

CJ
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Screencast - Getting to Know the Pipeline

916 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