Hi all,
I am using WAS SP9 (with EP & KM). I am connecting to corporate exchange server and i am sending mails and i have permission to relay from my server also. The code i used is working fine in webdynpro and also in simple java file but its not working in Abstract Portal Component. Following is the code snippet....
boolean sessionDebug = false; Properties props = System.getProperties(); props.put("mail.smtp.auth","true"); props.put("mail.transport.protocol", "smtp"); Session session = Session.getDefaultInstance(props, null);//getting error in this line session.setDebug(sessionDebug); .....
In the above acode I am getting PRT error when i get instance of session by session.getDefaultInstance method.
I didnt configure anything in the server(like javamail client). Help me out on this...
Thanks in Advance..
Regards
Vasu
Hi All,
Any ideas or solutions please?
I am also trying to trigger email from PDK.
I am also able to trigger emails from webdynpro, but the same code is not working in AbstractPortalComponent.
I would be very grateful if you guys give some ideas.
<b>Regards,
Sai Krishna.</b>
1.do not use
Properties props = System.getProperties();
instead use
Properties props = new Properties();
props.put("mail.smtp.auth","true");
props.put("mail.transport.protocol", "smtp");
2. Why are you setting mail.smtp.auth to true. Most of the SMTP servers do not need authentication when sending mails provided the e-mail address of the sender is a valid address.
Akhilesh
Dont forget to awars points if useful.
Add a comment