Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

using smtp protocol to GET email

Hi,
I am writing a JSP where I need to GET (not SEND) emails. The proper way of doing this is to create a store object such as:  
Store mstore = msession.getStore("pop3");
Here it will take a protocol such as "pop3" or "imap" as its argument but not "smtp".  The problem is that I need to use the "smtp" protocol because this is what is being used within our facility to GET emails as well as to SEND them. This protocol is typically correct for SENDING but not for GETTING emails. Our network administrator has the IMAP and POP3 protocols turned off on the Microsoft Exchange server and he will not allow any changes here that may effect our emails. The problem is that the getStore function will not accept "smtp" as it is not a typical store protocol argument. This function will accept a full url as oppose to just the protocol. However, when trying to use a full url (URLName object) I still run into the same problem if "smtp" is the protocol.  I have also tried just about everything with the setting of the properties in my program. Still no success. How do I create a store object in my program so I can connect with an "smtp" protocol to GET emails?
                Thanks, Don
0
donfmurphy
Asked:
donfmurphy
  • 9
  • 8
1 Solution
 
CEHJCommented:
>>this is what is being used within our facility to GET emails as well as to SEND them.

How?
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
I am receiving emails from a Microsoft Exchange email server. Our administrator has it set to return emails to each user with the SMTP protocol.
                 Thanks, Don
0
 
CEHJCommented:
I can only imagine that what's going on here is that an smtp server is running on your machine, with one target address (yours) so that your mail is being got through a push technology instead of a pull (connecting to a POP server from your machine). The only thing i can think of is to replace that server with a Java one over which you can then have control
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
NovaDenizenCommented:
SMTP is definitely not a protocol used to download mail.  In SMTP, the client attaches to a server and pushes mail to the  server; the server can't push mail back to the client and the client can't pull mail from the server.

Maybe the mail server's hostname is "smtp.yourdomain.com" and you confused that with use of the SMTP protocol.  
"smtp" is a fairly traditional name for a mail server.
0
 
donfmurphyAuthor Commented:
Hi,
My machine is part of a network of machines that gets its email from a main Microsoft Exchange Server. I use Outlook to get my mail locally. Nothing out of the ordinary I don't think. On my local machine I am writing a JSP to GET this email. When I was not able to connect with POP3 or IMAP, I checked with the Administrator and he said that both those protocols are turned off on the server and that email is being retrieved from this server with the SMTP protocol. Which explains why I cannot connect. So I don't know how else to explain the problem.
                                  Thanks, Don
0
 
CEHJCommented:
>>I use Outlook to get my mail locally.

Have a look at the configuration of this, particularly what protocols are being used and the server addresses
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
I have verified the addresses. How do I check for the protocol in Outlook, do you know?
                              Thanks, Don
0
 
CEHJCommented:
Are any of the addresses the same as your machine?

>>How do I check for the protocol in Outlook

Not sure - i use Outlook Express
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
No the addresses are different from my machine. I have been looking into how I can check the protocol Outlook uses but have not found it yet.
               Thanks, Don
0
 
CEHJCommented:
How many are there?
Are they different?
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
There is only one address that is used to both send and receive e-mails here.
            Thanks, Don
0
 
CEHJCommented:
Can you do

telnet <that address> 110

with any result?
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
I get a 'Connection Refused'.
            Thanks, Don
0
 
CEHJCommented:
Out of interest, does the following produce anything?

netstat | find "25"
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
I get a 'No such file or directory'.
            Thanks, Don
0
 
donfmurphyAuthor Commented:
Hi CEHJ,
What protocol does your Outlook Express use?
            Thanks, Don
0
 
CEHJCommented:
POP and SMTP
0
 
CEHJCommented:
8-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 9
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now