Alex Andrushchak wrote:
I've done next step, but still have problems:
Sending the message...SessionMailerBean.send: checkpoint 1.
connecting to 192.168.1.2
connected to 192.168.1.2
received : 220 gate.dekasoft.com.ua ESMTP Postfix
sent: HELO alex
received : 250 gate.dekasoft.com.ua
Failed !
Cannot send the message with MailerBean:java.lang.Exception: The message
can not
be send : error
(org.apache.geronimo.javamail.transport.smtp.SMTPTransportExcep
tion: no FROM address)
Hi Alex
Just one more idea; I checked the Adventure Builder code to see if I was
able to see any differences from your code.
The Adventure Builder code calls the method setFrom() on the MimeMessage
object before attempting to send it.
The javadoc for the geronimo implementation of the method specifies:
* If session is not null, we first look for an address specified in
* its "mail.from" property; if this is not set, we look at its
* "mail.user" and "mail.host" properties and if both are not null
* then an address of he form "[EMAIL PROTECTED]" is created.
* If this fails to give an address, then an attempt is made to
* create an address by combining the value of the "user.name"
* System property with the value returned from
* InetAddress.getLocalHost().getHostName().
So it seems this might be the key to get the mail.from property picked up.
Could you try adding the call to message.setFrom()?
Jakob