Get sure yu setup localhost (127.0.0.1) as AuthorizedClient (default) in config.xml. Canyou test if you can send email via telnet from localhost to external addresses ?
bye Am Mittwoch, den 12.04.2006, 11:00 +0530 schrieb Santosh: > Did you look at the JavaMail logs that get printed upon setting > session.setDebug(true)? > > Santosh. > > -----Original Message----- > From: Thibaut [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 11, 2006 11:43 PM > To: James Users List > Subject: Re: send mail > > I configured the "config.xml" like that : > > <processor name="root"> > <mailet match="All" class="MessageSave"> > <folder>/home/thibaut/tmp/unavailable</folder> > <subject>You have been marked as UNAVAILABLE</subject> > <content>Send a message to [EMAIL PROTECTED] to > reset.</content> > </mailet> > ... > </processor> > > In "MessageSave.java" : > > public void service(Mail mail) > { > try { > saveMailInDataBase(mail); > sendConfirmationMail(mail); > ... > } > } > > In the "sendConfirmationMail(mail)" : > > Properties props = System.getProperties(); > props.put("mail.smtp.host", "localhost"); > Session session = Session.getDefaultInstance(props, null); > MimeMessage message = new MimeMessage(session); > message.setFrom(new InternetAddress(this.from)); > InternetAddress adresTo = new InternetAddress(to); > message.addRecipient(Message.RecipientType.TO, adresTo); > message.setSubject(subject); > message.setContent(content, "text/html"); > javax.mail.Transport.send(message); > > > I have no problem to saveMailInDataBase but this doesn't send any mail > back ... > > My log : > > 541 javax.mail.SendFailedException: Sending failed; > 542 nested exception is: > 543 class javax.mail.SendFailedException: Invalid Addresses; > 544 nested exception is: > 545 class javax.mail.SendFailedException: 550 - Requested > action not taken: relaying denied > 546 > 547 at javax.mail.Transport.send0(Transport.java:218) > 548 at javax.mail.Transport.send(Transport.java:80) > > > > > > The adresses are not invalid > > > > > > > Norman Maurer a écrit : > > >Sorry but i don't understand whats your problem.. Please can you > explain > >a bit more and add logs or something like that ? > > > >bye > > > >Am Dienstag, den 11.04.2006, 19:01 +0200 schrieb Thibaut: > > > > > >>hi, > >> > >>I receive email on the port 25 with james. I try to send email from > the > >>james server (to confirm the reception). > >> > >>I do : > >> > >> Properties props = System.getProperties(); > >> props.put("mail.smtp.host", "localhost"); > >> Session session = Session.getDefaultInstance(props, > null); > >> MimeMessage message = new MimeMessage(session); > >> message.setFrom(new InternetAddress(this.from)); > >> InternetAddress adresTo = new InternetAddress(to); > >> message.addRecipient(Message.RecipientType.TO, adresTo); > >> message.setSubject(subject); > >> message.setContent(content, "text/html"); > >> javax.mail.Transport.send(message); > >> > >> > >>but this doesn't work. (no error but no mail leaves) > >>I read http://james.apache.org/FAQ.html#3 but i can't figure out the > >>solution. > >> > >>Can anyone help me ? > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > !EXCUBATOR:2,443c9159239514185873712! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
