• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems with Mail4Me

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

This is getting bored . But again, sorry for my poor English.

I need some help about using the Mail4ME package. I try to run the example of Michael Yuan (Enterprise J2ME book - the Mail application) but It doesn't work properly. I only change the properties of the JAD file:

address, hostname, pop3Host, pop3User, pop3Pass, smtpHost, smtpUser, smptPass

When I try to run the example (SendDemo MIDlet), just like it is, it doesn't work. It hangs up when trying to open the connection with the STMP Server, without throwing any Exception. It just hangs up, rare don't?
I change the code, putting the networking operations in a different Thread that the commandAction() Handler, and It works, only if I open the connection with no authentication.


try {
if (smtpAuth) {
smtpClient.open(smtpHost, 0, false,
smtpUser, smtpPass); //-> It doesn't work
} else {
smtpClient.open(smtpHost);
}
smtpClient.sendMessage(message);

I'm using the example within my LAN. With the WTK2 emulator (in one machine), and the ArgoSoft Mail Server (in another PC).
I take a look at the Mail4Me sources, and when authentication is needed it use the following code:

execute(null);
if ((user != null) && (pass != null)) {
execute("EHLO " + localhost);
execute("AUTH PLAIN " + getAuthString(user, pass));
}

When it try to call the method "execute" with the "AUTH PLAIN " + getAuthString(user, pass) parameter, the ArgoSoft Mail Server replies with the code 502 (Command not implemented).
I put the following line in the code:

System.out.println("HELP: " + execute("HELP"));

And this is the result:

HELP: 214-This is ArGoSoft Mail Server Freeware, Version 1.8 (1.8.8.3)-
Following commands are supported:
-HELO EHLO MAIL RCPT-DATA RSET NOOP AUTH-LOGIN-QUIT-

It supports the command "AUTH", but not the command "AUTH PLAIN". I think so.

I want to know if anybody use this example with another Mail Server, and get a better result.

Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic