Solved

Java Mail or qMail

Posted on 2002-06-07
4
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
getting param value 7 61
parse example 13 97
mask rule in struts validation.xml 5 104
by zero exception 10 79
The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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