gudii9
asked on
Email User with attachemnt program
Hi,
I am looking for a sample java progam which emails user with simple excel or text file attachemnt from local machine say C drive.
Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
I am looking for a sample java progam which emails user with simple excel or text file attachemnt from local machine say C drive.
Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
ASKER
I tried this example from below link
http://www.roseindia.net/javamail/Introduction-to-Java-Mail-API.shtml
>>>Download the JAF 1.1 zip from the link given below:
>>http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html
>>Steps to install Java Beans Activation Framework
>>Unzip the jaf-1_1_1.zip archive.
>>Set CLASSPATH to include the "activation.jar" file obtained from the download
I could not find the activation jar in the downloaded zip to be included in the classpath. Please advise
http://www.roseindia.net/javamail/Introduction-to-Java-Mail-API.shtml
>>>Download the JAF 1.1 zip from the link given below:
>>http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html
>>Steps to install Java Beans Activation Framework
>>Unzip the jaf-1_1_1.zip archive.
>>Set CLASSPATH to include the "activation.jar" file obtained from the download
I could not find the activation jar in the downloaded zip to be included in the classpath. Please advise
ASKER
I even tried this program
http://www.roseindia.net/javamail/SendAttachment.shtml
which is also not working. Please advise
http://www.roseindia.net/javamail/SendAttachment.shtml
which is also not working. Please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agree with pramodkrjsr. Try his solution.
ASKER
http://www.tutorialspoint.com/java/java_sending_email.htm
getting error like
javax.mail.MessagingExcept
nested exception is:
java.net.ConnectException:
at com.sun.mail.smtp.SMTPTran
at com.sun.mail.smtp.SMTPTran
at javax.mail.Service.connect
at javax.mail.Service.connect
at javax.mail.Service.connect
at javax.mail.Transport.send0
at javax.mail.Transport.send(
at com.phh.SendEmail.main(Sen
Caused by: java.net.ConnectException:
at java.net.PlainSocketImpl.s
at java.net.PlainSocketImpl.d
at java.net.PlainSocketImpl.c
at java.net.PlainSocketImpl.c
at java.net.SocksSocketImpl.c
at java.net.Socket.connect(So
at java.net.Socket.connect(So
at com.sun.mail.util.SocketFe
at com.sun.mail.util.SocketFe
at com.sun.mail.smtp.SMTPTran
... 7 more
please advise