Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javamail and smtp

 
christine lorraine
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. im using javamail
for the smtp server i specified our smtp server.
when sending emails in the same organization javamail works fine.
but when i specify an address on a different domain a SendingFailedException is displayed.
i read that the problem is the setting of SMTP server. but when i use outlook to send an email on a different domain using the same SMTP server, i am able to send the email.
thanks
 
Jared Krull
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many SMTP servers do not allow relaying of messages to other servers.
IE... you are registered with ISP1 and while using their dialup can access their SMTP and send to whoever. If you dialup on ISP2 and try to send a message to an ISP2 address through ISP1's SMTP (through Outlook Express) you will most likely get an error.
This gives you some options,
Get another SMTP server that allows relays (There is a list on this board somewhere), or
Write directly to the relevand SMTP. IE... if you are sending to ISP1, use ISP1's SMTP, if its for ISP2, use ISP2's SMTP (This is a pain, so the first option is best)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic