R
Rico
Hello Ppl.
I am running into a problem which is addressed by the JavaMail FAQ thus:
--------------------------------------------------------------------------
Q: When I try to send a message, why do I get
javax.mail.SendFailedException: 550 Unable to relay for my-address?
A: This is not a JavaMail problem. This is an error reply from your SMTP
mail server. It indicates that your mail server is not configured to allow
you to send mail through it....
--------------------------------------------------------------------------
It is an Exchange Server I am trying to connect to with the following code:
Transport thisSMTP = session.getTransport("smtp");
thisSMTP.connect("my.smtp.server",
"my.username", "this.is.my.real.password");
forward.saveChanges();
thisSMTP.sendMessage(forward, forward.getAllRecipients());
thisSMTP.close();
This code works for a different, most likely Unix-based, smtp server.
However, I have no problems sending email using Outlook or Thunderbird via
the Exchange Server on the very same computer (and authentication
settings) that I am running the above code on.
I have checked that on the server relaying is allowed for people who have
managed to authenticate regardless of address.
Could someone please provide some pointers where I could look?
Thanks.
Rico.
I am running into a problem which is addressed by the JavaMail FAQ thus:
--------------------------------------------------------------------------
Q: When I try to send a message, why do I get
javax.mail.SendFailedException: 550 Unable to relay for my-address?
A: This is not a JavaMail problem. This is an error reply from your SMTP
mail server. It indicates that your mail server is not configured to allow
you to send mail through it....
--------------------------------------------------------------------------
It is an Exchange Server I am trying to connect to with the following code:
Transport thisSMTP = session.getTransport("smtp");
thisSMTP.connect("my.smtp.server",
"my.username", "this.is.my.real.password");
forward.saveChanges();
thisSMTP.sendMessage(forward, forward.getAllRecipients());
thisSMTP.close();
This code works for a different, most likely Unix-based, smtp server.
However, I have no problems sending email using Outlook or Thunderbird via
the Exchange Server on the very same computer (and authentication
settings) that I am running the above code on.
I have checked that on the server relaying is allowed for people who have
managed to authenticate regardless of address.
Could someone please provide some pointers where I could look?
Thanks.
Rico.