Well it does work differently + different SMTP servers were installed. Solaris and Windows did not have same SMTP server (the software).
Now we use Windows SMTP I run it from any machine with windows os and vice versa
Вопрос
I'm forbidden to bring out the business code, its an enterprises application that sends approximately 1000 mails a day.
This way mails are sent. The problem is that, code that runs in windows PC using Windows SMTP is not running for Solaris SMTP. Why JAVA, which is advocate to be platform portable is behaving like this? Java version is 1.3.2
Socket socketSMTP= new Socket(server_name,smtp_port);
BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(socketSMTP.getInputStream()));
PrintWriter writer= new PrintWriter(socketSMTP.getOutputStream());
String respones="";
//--Some codes to check if server is ready --
writer.println("MAIL FROM:<"+sender_address.trim()+">");
writer.flush();
respones=reader.readLine();
if(!tmp_msg.startsWith("250"))throw new Exception("Error in protocol "+respones);
this part is where I'm getting error, Solaris SMTP expect 'username' in the place of sender_address whereas Windows SMTP expects 'mail id' in place of sender_address; sender_address is a String variable available from a POJO class
Решение
Well it does work differently + different SMTP servers were installed. Solaris and Windows did not have same SMTP server (the software).
Now we use Windows SMTP I run it from any machine with windows os and vice versa