java.util.regex.PatternSyntaxException

backup
2007-02-15
2013-04-03
  • backup
    backup
    2007-02-15

    Hello

    I'm using g4j1.1 and tried to connect to GMail
    in the send() function i'm getting an exception.

    Error sending mail: java.util.regex.PatternSyntaxException: Unclosed character class near index 6
    D\\(\\[
          ^
        at java.util.regex.Pattern.error(Pattern.java:1650)
        at java.util.regex.Pattern.clazz(Pattern.java:2199)
        at java.util.regex.Pattern.sequence(Pattern.java:1727)
        at java.util.regex.Pattern.expr(Pattern.java:1687)
        at java.util.regex.Pattern.group0(Pattern.java:2457)
        at java.util.regex.Pattern.sequence(Pattern.java:1715)
        at java.util.regex.Pattern.expr(Pattern.java:1687)
        at java.util.regex.Pattern.compile(Pattern.java:1397)
        at java.util.regex.Pattern.<init>(Pattern.java:1124)
        at java.util.regex.Pattern.compile(Pattern.java:817)
        at java.lang.String.replaceAll(String.java:2000)
        at net.sf.gm.util.ParseUtils.parseGMResponse(ParseUtils.java:127)
        at net.sf.gm.util.ParseUtils.parseSendResponse(ParseUtils.java:648)
        at net.sf.gm.impl.GMClient.send(GMClient.java:1042)
        at B.main(B.java:24)

    This is code in my main() function

    public static void main(String [] args) throws Exception{

    GMLoginInfo login= new GMLoginInfo();
    login.setUsername("********");
    login.setPassword("*********");
    GMClient client=new GMClient(login);
    System.out.println(client.connect());
    GMComposedMessage  mesg = new GMComposedMessage();
    mesg.setSubject("ha ha ha");
    mesg.setMessageBody("hu hu hu");
    mesg.addTo("backup.ouce@gmail.com");
    GMSendResponse resp= client.send(mesg);
    }}

    Plzz help me
    thank you