smsiva

Greenhorn
+ Follow
since Aug 23, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by smsiva

Hi to All

How to compile,create jar file and deploy the Session Bean on Weblogic 8.0 File Path on my drive is

F:\Example\ejb-jar.xml
F:\Example\weblogic-ejb-jar.xml
F:\Example\Hello.java
F:\\Example\HelloBean.java
F:\Example\HelloClient.java
F:\Example\HelloHome.java

Thanks in Advance

Sivasm
13 years ago
Execptions help to resove)
***************************
Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for dhandapanism@gmail.com
******************************************************************
my codes
*******************************************
package fraternity.Mails;

import java.util.*;
import javax.activation.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.naming.*;
public class Mails
{

public String msgsend()
{

try{
InitialContext ic = new InitialContext();
Session session = (Session) ic.lookup("MyMail1");
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", "localhost");
props.put("mail.from","dhandapanism@hotmail.com");
Session session2 = session.getInstance(props);
Message msg = new MimeMessage(session2);
msg.addRecipient(Message.RecipientType.TO, new InternetAddress("dhandapanism@gmail.com"));
msg.setSubject("hi");
msg.setSentDate(new Date());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("Testing Java Mail");
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp);
msg.setContent(mp);
Transport.send(msg);

}
catch(Exception es)
{
return es.getMessage();
}
return " No error"+"message successfully send..!";
}
}
thanks
sivasm,(gobi arts)
13 years ago