on 05-10-2007 2:30 PM
Hi all,
I am following the blog by Giridharan S from SAP Labs India
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0bf26e2-9bb3-2910-ea87-ee67a8ad5ab6">Using JavaMail in Web Dynpro Java applications for sending e-mails</a> I am not able to resolve Session, MimeMessages,InternetAddress, even when i choose organize imports.
Can any one tell me what I need to import to resolve the above.
regards
Deepu
Hi,
Go to following link:
<a href="https://maven-repository.dev.java.net/nonav/repository/javax.mail/jars/">Java Mail url</a>
Download the jar mail-1.4.jar to your system.
Add this jar to your project classpath and then do "organise import" in your class.
Hope it helps.
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ashwini,
thanks for the quick response and resolving the issue, but still I am facing some errors while using the code...
could you please help me out in knowing the line
<b> message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));</b>
its adding the recipient, but what are the parameters. when I am using the code as it is... its giving error in the first parameter.
and also at
<b>Transport.send(message); </b> here the methode send() is not exist. it is also giving error
Hi,
check out this: Message.RecipientType.TO specifies the recipients address,
http://java.sun.com/products/javamail/javadocs/javax/mail/Message.RecipientType.html
and
if send() is anavailable try using,
transport.sendMessage(message,
message.getRecipients(Message.RecipientType.TO));
for reportSuccess():
wdComponentAPI.getMessageManager.reportSuccess("Success");
hope it helps
regards
some more problems to resolve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can get full information and resources for JavaMail from following location:
<a href="http://java.sun.com/products/javamail/downloads/index.html">Java Mail Full</a>
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
write this
import javax.mail.Session;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
seems you are doing local project, here you need to add external JAR.
https://maven-repository.dev.java.net/nonav/repository/javax.mail/jars/
find here the mail.jar , save it on your disk and then right click on project, goto properties ->java build path->add external jar, and the jar then try to import the files
regards
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.