comparison src/goodjava/mail/Smtp.java @ 1830:d72a52232f79 default tip

mail - minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 24 Sep 2024 17:17:57 -0600
parents 0eb615de1f80
children
comparison
equal deleted inserted replaced
1829:0eb615de1f80 1830:d72a52232f79
26 throw new MailException(s); 26 throw new MailException(s);
27 write( "EHLO " + helo + "\r\n" ); 27 write( "EHLO " + helo + "\r\n" );
28 ehlo = read(); 28 ehlo = read();
29 if( !ehlo.startsWith("250") ) 29 if( !ehlo.startsWith("250") )
30 throw new MailException(ehlo); 30 throw new MailException(ehlo);
31 }
32
33 public Smtp(Socket socket) throws IOException, MailException {
34 this(socket,"GoodJava");
31 } 35 }
32 36
33 public String authenticate(String username,String password) throws IOException, MailException { 37 public String authenticate(String username,String password) throws IOException, MailException {
34 String s = "\0" + username + "\0" + password; 38 String s = "\0" + username + "\0" + password;
35 s = GoodUtils.base64Encode(s); 39 s = GoodUtils.base64Encode(s);