Showing results for 
Search instead for 
Did you mean: 

Missing libraries

Former Member
0 Kudos

Hi all,

I want to send an email. I have this code.

import javax.mail.Message;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;

Properties p = new Properties();

p.put("mail.transport.protocol", "smtp");

p.put("", "server name");

p.put("mail.smtp.port", "25");

String subject = sub.getValue().toString();

TextEdit body =

(TextEdit) this.getPageContext().getComponentForId(


String bodystr = body.getText();

MimeMessage m = new MimeMessage(s);

InternetAddress myAddress =

new InternetAddress(user.getEmail());

recipientAddress = new InternetAddress(email);


m.setRecipient(Message.RecipientType.TO, recipientAddress);


m.setContent(bodystr, "text/plain");


I cant import those libraries. It seems they are missing. (import is underlined and says: The import cant be resolved) What should I do? Where can I get those libraries?

PLS help.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ivo Kostelecky,

You just need to add the mail.jar and activation.jar to ur project to resolve the issue.

Select your project -> Right Click -> Properties -> Java Build Path -> Add Exeternal Jars

Select the above mentioned jar files and then add it.

These two jar files can be downloaded from

<a href=""></a>

If you cannot find them then I will forward it to you.



Former Member
0 Kudos

Thank you. I have already found them.

Active Contributor
0 Kudos

Need to include the JAR into PROJECT.

You need to import the library into "lib" folder.

From NWDS, WebDynpro prospect, click to "Navigator" tab, right click on "lib" folder --> import --> File System --> choose JAR files.

Build and deploy.

Answers (0)