السلام عليكم
أحاول تطبيق برنامج لإرسال إيميل بلغة جافا
و لكن يظهر لدي الرسالة التالية عند استخدام التعليمة nslookup -type=MX gmail.com
,nslookup' is not recognized as internal or external commad'
operable program or batch file
فماهو الحل و شكرا
السلام عليكم
أحاول تطبيق برنامج لإرسال إيميل بلغة جافا
و لكن يظهر لدي الرسالة التالية عند استخدام التعليمة nslookup -type=MX gmail.com
,nslookup' is not recognized as internal or external commad'
operable program or batch file
فماهو الحل و شكرا
الأخ الكريم/الأخت الكريمة
السلام عليكم ورحمة الله وبركاته
مرحباً بكم في منتدى الفريق العربي للبرمجة
نود تنبيهك أن العنوان غير مناسب.
الرجاء اختيار عنوان مناسب أكثر في مواضيعك القادمة، وهذا بمثابة إشعار للأهمية.
وفي حال التكرار سيتعرض موضوعك للإغلاق والحذف!!!
قواعد المشاركة
شاكرين لكم حُسن تعاونكم
علاء الصالحي كتب:اعرض الشيفرةتحياتي
لم أفهم ما تقصد!!
هل تعني البرنامج
import java.io.*;
import java.net.*;
public class EmailSender
{
public static void main(String[] args) throws Exception
{
// Establish a TCP connection with the mail server.
Socket socket = new Socket("mx1.csusb.edu", 25);
// Create a BufferedReader to read a line at a time.
InputStream is = socket.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
// Read greeting from the server.
String response = br.readLine();
System.out.println(response);
if (!response.startsWith("220")) {
throw new Exception("220 reply not received from server.");
}
// Get a reference to the socket's output stream.
OutputStream os = socket.getOutputStream();
// Send HELO command and get server response.
String command = "HELO x\r\n";
System.out.print(command);
os.write(command.getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
if (!response.startsWith("250")) {
throw new Exception("250 reply not received from server.");
}
// Send MAIL FROM command.
command = "MAIL FROM: x@aiit.or.kr\r\n";
System.out.print(command);
os.write(command.getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
if (!response.startsWith("250")) {
throw new Exception("250 reply not received from server.");
}
// Send RCPT TO command.
command = "RCPT TO: dturner@csusb.edu\r\n";
System.out.print(command);
os.write(command.getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
if (!response.startsWith("250")) {
throw new Exception("250 reply not received from server.");
}
// Send DATA command.
command = "DATA\r\n";
System.out.print(command);
os.write(command.getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
if (!response.startsWith("354")) {
throw new Exception("354 reply not received from server.");
}
// Send message data.
os.write("SUBJECT: test msg\r\n\r\n".getBytes("US-ASCII"));
os.write("David,\r\n".getBytes("US-ASCII"));
os.write("\r\n".getBytes("US-ASCII"));
os.write("This lab is too hard.\r\n".getBytes("US-ASCII"));
// End with line with a single period.
os.write(".\r\n".getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
if (!response.startsWith("250")) {
throw new Exception("250 reply not received from server.");
}
// Send QUIT command.
command = "QUIT\r\n";
System.out.print(command);
os.write(command.getBytes("US-ASCII"));
response = br.readLine();
System.out.println(response);
}
}شكرا
تم تعديل هذه المشاركة بواسطة علاء الصالحي في 23 نوفمبر 2008 في 02:43 — السبب: إضافة وسم code
طيب تكلم قليلاُ عن الشيفرة
يبدو لي أنك تحاول الإرسال إلى SMTP server
هل تحاول تنفيذ الأمر nslookup -type=MX gmail.com
على هذه الشيفرة أم أن هناك شيء آخر
بالمناسبة شيفرة تعريب لكلمة كود
تحياتي
تم تعديل هذه المشاركة بواسطة علاء الصالحي في 23 نوفمبر 2008 في 02:48 — السبب: خطأ إملائي
علاء الصالحي كتب:طيب تكلم قليلاُ عن الشيفرةيبدو لي أنك تحاول الإرسال إلى SMTP server
هل تحاول تنفيذ الأمر nslookup -type=MX gmail.com
على هذه الشيفرة أم أن هناك شيء آخر
بالمناسبة شيفرة تعريب لكلمة كود
تحياتي
نعم هذا ما أحاوله و لكن الcommand prompt عندي لا تتعرف على بعض الأوامر مثل nslookup
وغيرها
شكرا
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…