Solved

Java Mail or qMail

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change size of out.write buffer 1 87
Servlet Login session time and authentication using Filter 6 68
maven webservice projet error 6 80
spring example errors 33 250
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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