how to create email application
I want to make simple email application how to make with, I have recently downloaded NetBeans IDE 6.0 M10
I want to make simple email application how to make with, I have recently downloaded NetBeans IDE 6.0 M10
Could you be anymore vague?
You need to be more specific with the exact problems you are experiencing. Just saying "I want to write this. Tell me how" is not going to get you very far.
Your first step should be to decide what this email application is going to do. "Requirements Definition" is a formal name for this process.
> Could you be anymore vague?
I don't see the problem here guys. Maybe this person doesn't have detailed requirements and is simply looking for general info regarding Java and email. I think a vague question is fine and I supplied a vague answer.
you can do to this link
http://www.rgagnon.com/javadetails/java-0321.html
This link is great for beginner!! in Java Mail :)
It might be useful to check out the JavaMail forum:
http://forum.java.sun.com/forum.jspa?forumID=43
I am trying following
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class SendApp {
public static void send(String smtpHost, int smtpPort,
String from, String to,
String subject, String content)
throws AddressException, MessagingException {
// Create a mail session
java.util.Properties props = new java.util.Properties();
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.port", ""+smtpPort);
Session session = Session.getDefaultInstance(props, null);
// Construct the message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
msg.setSubject(subject);
msg.setText(content);
// Send the message
Transport.send(msg);
}
public static void main(String[] args) throws Exception {
// Send a test message
send("hostname", 25, "joe@smith.com", "sue@smith.com",
"re: dinner", "How about at 7?");
}
}
but following error occures:
package javax.mail does not exist.
package javax.mail does not exist.
package javax.activation does not exist.
while I have downloaded:
javamail-1.4
jaf-1.1
but I thik it is not integrated in to netbean
Pls. help
check out the javamail FAQ page. It will answer most of your questions and give you a way to download the packages you need:
http://java.sun.com/products/javamail/FAQ.html
It is difficult to understand something else?
how can I set paths in netbean IDE
Message was edited by:
MASTER-13
I have downloaded already but it is not working in netbeans.
I dont know how to set it with netbeans
Pls. help
I can't help you as I don't know netbeans. Have you looked at the netbeans help files? Have you gone to a netbeans forum? Those are the two places I'd start.
hey....
I have found that its now not showing any errors on import statement
but the following and build complete with following error
pls tell me what is the reason for the following line:
init:
deps-jar:
compile:
run:
Exception in thread "main" javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 421 Authorization failed: please authenticate by doing get message first
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at javaapplication7.Main.send(Main.java:40)
at javaapplication7.Main.main(Main.java:45)
Java Result: 1
BUILD SUCCESSFUL (total time: 17 seconds)
You are going to have to work on your English comprehension skills. Your inability to understand those relatively simple error messages is going to be a major problem in your learning to program.
Take those messages and translate them into whatever language you do speak. Then try and figure it out.
You just can't program by running back here with every simple error you encounter because you don't know any English and can't make an effort to get it translated.