B
Boki
sc = (SocketConnection)
Connector.open("socket://"+"smpt.abcd.com"+":25");
is = sc.openInputStream();
os = sc.openOutputStream();
os.write( ("USER " + "Boki" + "\r\n").getBytes());
os.write( ("PASS " + "PASS1234" + "\r\n").getBytes());
os.write(("HELO there" + "\r\n").getBytes());
os.write(("MAIL FROM: "+ "Boki" +"\r\n").getBytes());
os.write(("RCPT TO: "+ "(e-mail address removed)" +
"\r\n").getBytes());
os.write("DATA\r\n".getBytes());
// stamp the msg with date
os.write(("Date: " + date + "\r\n").getBytes());
os.write(("From: "+"From Boki"+"\r\n").getBytes());
os.write(("To:
"+"(e-mail address removed)"+"\r\n").getBytes());
os.write(("Subject: "+"Subject"+"\r\n").getBytes());
os.write((msg+"\r\n").getBytes()); // message body
os.write(".\r\n".getBytes());
os.write("QUIT\r\n".getBytes());
// I can't see this email on server.... it seems never send correctly.
Could you please advice ?
Thank you very much!
Best regards,
Boki.
Connector.open("socket://"+"smpt.abcd.com"+":25");
is = sc.openInputStream();
os = sc.openOutputStream();
os.write( ("USER " + "Boki" + "\r\n").getBytes());
os.write( ("PASS " + "PASS1234" + "\r\n").getBytes());
os.write(("HELO there" + "\r\n").getBytes());
os.write(("MAIL FROM: "+ "Boki" +"\r\n").getBytes());
os.write(("RCPT TO: "+ "(e-mail address removed)" +
"\r\n").getBytes());
os.write("DATA\r\n".getBytes());
// stamp the msg with date
os.write(("Date: " + date + "\r\n").getBytes());
os.write(("From: "+"From Boki"+"\r\n").getBytes());
os.write(("To:
"+"(e-mail address removed)"+"\r\n").getBytes());
os.write(("Subject: "+"Subject"+"\r\n").getBytes());
os.write((msg+"\r\n").getBytes()); // message body
os.write(".\r\n".getBytes());
os.write("QUIT\r\n".getBytes());
// I can't see this email on server.... it seems never send correctly.
Could you please advice ?
Thank you very much!
Best regards,
Boki.