Solved

Java Mail or qMail

Posted on 2002-06-07
4
312 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
Comment Utility
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 total points
Comment Utility
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
Comment Utility
any updates?

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
Glad I could help and Thanx for the "A".

CJ
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now