Solved

Java Mail or qMail

Posted on 2002-06-07
4
328 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

Expert Comment

by:cheekycj
ID: 7062309
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
rebasing and merging used in SCM 1 81
maven project in eclipse 11 60
TreeSet comparator example 7 103
countXY challenge 28 171
Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

680 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