• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a remote SMTP server  RSS feed

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am asking this again since I got no response yet. I am stuck on this problem so please help if you only can...

I am running my java code on one remote server (lets call it provider_1.com), they provide me with an smtp server access but they limit the amount of emails i can send per day, so I cannot really use it for my current project.

You see, there should be a lot of email traffic in this java app.

But I have another remote server (lets call it provider_2.com), they also provide me with an smtp server access and they do NOT limit the amount of emails i can send per day (wonderful!), but they do not suppport java.

What I am trying to do is to make the java code running on domain_1, call the smtp of domain_2 (instead of call the localhost smtp server, i.e. the smtp of domain_1).

I have found in sun's forums a piece of code to do that, how ever it does not work for me. I simply get no email to the destination mail box, I get no exceptions too...

I have asked the owners of the provider_2.com if I need some username+password to access the smtp they gave me. They said no...

Well this is very strange for me. If there is really no need for rusername+password to access (from external domains) the smtp I purchased from them, what could prevent programmers from other domains from using that smpt (on provider_2.com) for spamming the whole world.

Please help me to understand how can I make this code working for me. Or better yet, how can I make the remote smtp_2 responding when I call it from domain_1.com

Thanks.

Here is the code:

 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An essential piece of debugging information is the exception and its stack trace. How can you diagnose a problem if you don't look at what's wrong? Change your catch block to something like this:

and let us know what it prints out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!