Forums Register Login

Java Mail

+Pie Number of slices to send: Send
Hi,
I downloaded Java mail API and JAF. I tried to run the program which is included in Java mail api called msgsend. I have used net beans to compile the program. It is compiling well. but when i execute the program it ask me to enter to address and subject. In javamail api they have mentioned to end the program by using ctrl-z. but that is not working and even it is not printing that your message has been sent. Can any one tell me how to do. The link is here regarding tutorial http://developer.java.sun.com/developer/onlineTraining/JavaMail/exercises/MailSetup/index.html
+Pie Number of slices to send: Send
Hi,
Somebody please help with this
Thanks
+Pie Number of slices to send: Send
Which mail server do you use? First of all, make sure your mail server is up and running, and then
1. Put mail.jar and activation.jar explicitly in your classpath
2. then compiled the program C:\javamail-1.3.1\demo\>javac msgsend.java
3. then tried running the program with
C:\javamail-1.3.1\demo>java msgsend -o from@domainName -M
NameOfYOurServer to@domainName
for example:
C:\javamail-1.3.1\demo>java msgsend -o John3001@yahoo.com -M
smtp.mail.yahoo.com Alice1024@yahoo.com
4. The console asks for the subject.
5. fill something in the Subject and followed by <enter>
6. write a message and followed by <enter>
7. ctrl Z to indicate end of message and followed by <enter>
8. "Mail was send successfully" should be prompted to the console
BTW, when testing with msgsend you can use msgshow afterwards to see if your message arrived, like this 'java msgshow -L pop3://userid assword@localhost'. (make sure that you compile msgshow.java first)
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 993 times.
Similar Threads
JavaMail and Server
Java Mail application
Sending E-mails Using the JavaMail (How to Do It?)
Java Mail Server
javamail API
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:51:40.