I have a program for send a mail using java.i have successfully compile the program in my local system. In runtime i need SMTP server name.if i send a mail means SMTP server need for my local system.otherwise how to check my SMTP server name.Help me please!

Showing Answers 1 - 1 of 1 Answers

This is depends on your programing techif u go in this styleString hostSMTP = "";String to = "";String from ="";String subject = " ";StringBuffer body = new StringBuffer(); /* Constructing the body of the mail */ body.append(" ");SmtpClient client = new SmtpClient(hostSMTP); client.from(from); client.to(to); PrintStream message = client.startMessage(); message.println("To: " + to); message.println("Subject: "); message.println(body.toString()); message.println(); client.closeServer();No need of your local SMTP server name. you need only valid TO address and host SMTP server address.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions