import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
{
try (
Socket sock = openSocket(m_smtpHost, m_smtpPort);
- PrintWriter pw = new PrintWriter(sock.getOutputStream(), true);
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(sock.getOutputStream(), StandardCharsets.US_ASCII), true);
BufferedReader br = new BufferedReader(new InputStreamReader(sock.getInputStream(), getCharset()));
)
{