hello friends i am using glashfish application server.i have already configured
java mail session there & injecting that resource into java application.I want to send mail with attatchment .but i can't be able to send mail .so can you please check it out what was the issue in the code that has been triggered out .i am trying hard but cant able to solve query:
suppose i am configuring java mail session that is required to give name of jndi prefix to mail such as mail/MySession.can it be same applied to jms,
jdbc resources,i am getting confused in that as well..
i am pasting out code here:
i have already set following properties into glashfish server:
JNDI Name:MyMailConfig
Mail Host: smtp.gmail.com
Default User :JAVA Geek
Default Sender Address:********@gmail.com
Deployement Order :100
Advance properties :
Store Protocol: imap
Store Protocol Class: com.sun.mail.imap.IMAPStore
Transport Protocol:smtp
Transport Protocol Class:com.sun.mail.smtp.SMTPTransport
Additional Properties which are defined as follows:
mail.smtp.socketFactory.class :javax.net.ssl.SSLSocketFactory
mail.smtp.password :*********
mail.smtp.auth:true
mail.smtp.socketFactory.fallback: false
mail.smtp.socketFactory.port:465
The Client code which i have written as follows:
when i run this application i didnt found anything on console.so need help
can you please help me out guys..
thanks in advance.