Trouble Compiling my Email-client

Hi
I have written this email -client, but have some trouble compiling it !
Then I try to compile it the following errors:
MailClient.java:350: <identifier> expected
public syncronize void mails(String t){
^
MailClient.java:727: ';' expected
private class myWindowListener extends WindowAdapter{
^
MailClient.java:747: '}' expected
3 errors.
What do I need to change to correct these errors ?
I hope that there is somebody out there who can help me get my program to work.
Thanks in advance.
Sincrely Yours
Fred
import java.io.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
public class MailClient extends JFrame implements ActionListener{ 
private Sendman mySendman;
private Letterman myLetterman;
public Writer myWrite;
public Reader myReader;
public Composer myComposer;
private Setup mySetup;
public Addressbook myAdressbook;
private FixTask myFixTask;
private Filter myFilter;
private Info myInfo;
public Vector mailIndexVector = new Vector();
public Vector filterIndexVector = new Vector();
public Vector folderVector = new Vector();
private JPanel tArea, trae, icon, tField;
private JTextArea ta;
private JScrollPane view, treeScroll;
private JTree tree;
public JTextField tf;
private JSplitPane split;
private Dimension Size;
private MailClient myMailClient;
private String mailBody, subject, from;
public boolean fromOutbox = false;
public boolean viewSource = false;
public static void main (String[] args) {
     MailClient myMailClient = new MailClient();
public MailClient() {
     super("Mail-Client");
     ImageIcon linux = new ImageIcon("linux.gif");
     this.setIconImage(linux.getImage());
     icon = new JPanel();
     icon.setLayout(new FlowLayout(FlowLayout.LEFT));
     ImageIcon neu = new ImageIcon("getmail.gif");
     JButton neueMails = new JButton(neu);
     newMails.setActionCommand("Getting new Mails");
     newMails.addActionListener(this);
     newMails.setBorderPainted(false);
     newMails.setToolTipText("Getting new Mails");
     ImageIcon cr = new ImageIcon("creator.gif");
     JButton creator = new JButton(cr);
     creator.setActionCommand("Creator open");
     creator.addActionListener(this);
     creator.setBorderPainted(false);
     creator.setToolTipText("Creator open");
     JButton rep = new JButton(new ImageIcon("reply.gif"));
     rep.setActionCommand("rep");
     rep.addActionListener(this);
     rep.setBorderPainted(false);
     rep.setToolTipText("Reply");
     JButton fwd = new JButton(new ImageIcon("fwd.gif"));
     fwd.setActionCommand("fwd");
     fwd.addActionListener(this);
     fwd.setBorderPainted(false);
     fwd.setToolTipText("Forward");
     JButton ein = new JButton(new ImageIcon("settings.gif"));
     ein.setActionCommand("settings open");
     ein.addActionListener(this);
     ein.setBorderPainted(false);
ein.setToolTipText("Setting open");
JButton adr = new JButton(new ImageIcon("adressbook.gif"));
adr.setActionCommand("adr");
adr.addActionListener(this);
adr.setBorderPainted(false);
adr.setToolTipText("Addressbook");
JButton lo = new JButton(new ImageIcon("trash.gif"));
lo.setActionCommand("trash");
lo.addActionListener(this);
lo.setBorderPainted(false);
lo.setToolTipText("trash");
JButton in = new JButton(new ImageIcon("info.gif"));
in.setActionCommand("Information");
in.addActionListener(this);
in.setBorderPainted(false);
in.setToolTipText("Information");
icon.add(newMails);
icon.add(creator);
icon.add(rep);
icon.add(fwd);
icon.add(set);
icon.add(adr);
icon.add(lo);
icon.add(in);
Vector h1 = myLeser.lese("Summary.4on");
for(int i=0; i<h1.size(); i+=7){
String id = h1.elementAt(i).toString();
String fo = h1.elementAt(i+1).toString();
String su = h1.elementAt(i+2).toString();
String fr = h1.elementAt(i+3).toString();
String to = h1.elementAt(i+4).toString();
String da = h1.elementAt(i+5).toString();
String re = h1.elementAt(i+6).toString();
MailIndex index = new MailIndex(id, fo, su, fr, to, da, re);
mailIndexVector.addElement(index);
Vector h2 = myReader.read("Filter.4on");
for(int j=0; j<h2.size(); j+=3){
String fo = h2.elementAt(j).toString();
String from = h2.elementAt(j+1).toString();
String te = h2.elementAt(j+2).toString();
FilterIndex index = new FilterIndex(fo, from, te);
filterIndexVector.addElement(index);
folderVector = myReader.read("Folder.4on");
DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
top = new DefaultMutableTreeNode("mails");
top.add(inbox = new DefaultMutableTreeNode("Inbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Inbox"))
     inbox.add(new DefaultMutableTreeNode(m));
top.add(outbox = new DefaultMutableTreeNode("Outbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Outbox")){
     outbox.add(new DefaultMutableTreeNode(m));
top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Sentbox"))
     sentbox.add(new DefaultMutableTreeNode(m));
for(int j=0; j<folderVector.size(); j++){
top.add(trash =
     new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
for(int i=0; i<mailIndexVector.size(); i++){
     MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
     if (m.folder.equals(folderVector.elementAt(j).toString()))
     trash.add(new DefaultMutableTreeNode(m));
tree = new JTree(top);
tree.getSelectionModel().setSelectionMode
(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.addTreeSelectionListener(new myTreeSelectionListener());
treeScroll = new JScrollPane(tree);
treeScroll.setFont(new Font("Monospaced",Font.PLAIN,6));
baum.add("Center", treeScroll);
MainMenu menuBar = new MainMenu(this, this);
setJMenuBar(menuBar);
setVisible(true);
public void mailsFetcher() {
myLetterman = new Letterman(this, mySetup);
myLetterman.start();
public void treeNewSign(){
trae.remove(treeScroll);     
DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
top = new DefaultMutableTreeNode("mails");
top.add(inbox = new DefaultMutableTreeNode("Inbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Inbox"))
     inbox.add(new DefaultMutableTreeNode(m));
top.add(outbox = new DefaultMutableTreeNode("Outbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Outbox"))
     outbox.add(new DefaultMutableTreeNode(m));
top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
for(int i=0; i<mailIndexVector.size(); i++){
MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
if (m.folder.equals("Sentbox"))
     sentbox.add(new DefaultMutableTreeNode(m));
for(int j=0; j<folderVector.size(); j++){
top.add(trash =
     new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
for(int i=0; i<mailIndexVector.size(); i++){
     MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
     if (m.folder.equals(folderVector.elementAt(j).toString()))
     trash.add(new DefaultMutableTreeNode(m));
tree = new JTree(top);
tree.getSelectionModel().setSelectionMode
(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.addTreeSelectionListener(new myTreeSelectionListener());
treeScroll = new JScrollPane(tree);
trae.add("Center", treeScroll);
trae.repaint();
setVisible(true);
public void menuNewSign(){
setJMenuBar(new MainMenu(this, this));
setVisible(true);
public String fromFilter (String t){
String myFrom = "";
int start, end;
int a = t.indexOf("From:");
if (a != -1){
start = a + 6;
ende = t.indexOf("\n",start);
myFrom = t.substring(start,end);
return myFrom;
public String toFilter (String t){
String myTo = "";
int start, e1, e2, end;
int a = t.indexOf("To:");
if (a != -1){
start = a + 4;
end = t.indexOf("\n",start);
myTo = t.substring(start,end);
e1 = end + 1;
if(t.substring(e1,e1+1).equals(" ")){
     while(t.substring(e1,e1+1).equals(" ")){
     while(t.substring(e1,e1+1).equals(" "))
     e1++;
     e2 = t.indexOf("\n",e1);
     myTo += " " + t.substring(e1,e2);
     e1 = e2 + 1;
return myTo;
public String dateFilter (String t){
String myDate = "";
int start, end;
int a = t.indexOf("Date:");
if (a != -1){
start = a + 6;
end = t.indexOf("\n",start);
myDate = t.substring(start,end);
return myDate;
public String subjectFilter (String t){
String mySubject = "";
int start, end;
int a = t.indexOf("Subject:");
if (a != -1){
start = a + 9;
end = t.indexOf("\n",start);
mySubject = t.substring(start,end);
return mySubject;
public String mailFilter (String t){ 
String myMail = "";
int start = 0, end = t.length();
start = t.indexOf("\n\n") + 2;
if (start != 1){
int a = t.indexOf("\n\n" ,start);
if (a != -1){
     if (t.indexOf(".",a+2) == a+2)
     if (t.indexOf("\n",a+3) == a+3)
     start = a;
myMail = t.substring(start,end);
return myMail;
public void mailsRemark(String file){
String mail = "", t = "";
Vector mailVector = myReader.read(file);
for (int i=0; i<mailVector.size(); i++)
t += (String)mailVector.elementAt(i) + "\n";
from = fromFilter(t);
subject = subjectFilter(t);
mailBody = mailFilter(t);
mail += "Subject: " + subject + "\n";
mail += "Date: " + dateFilter(t) + "\n";
mail += "From: " + from + "\n";
mail += "To: " + toFilter(t) + "\n";
mail += "\n" + mailBody;
if(viewSource == true)
ta.setText(t);
else
ta.setText(mail);
public syncronize void mails(String t){
Status myStatus = new Status(this,t);
myStatus.start();
public void delete(){
if(tree.getLastSelectedPathComponent() != null){
DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
if(node.isLeaf()){
     Object nodeInfo = node.getUserObject();
     if(nodeInfo instanceof MailIndex){
     MailIndex index = (MailIndex)nodeInfo;
     mailIndexVector.removeElement(index);
     int count = 0;
     for(int j=0; j<mailIndexVector.size(); j++){
     MailIndex index1 = (MailIndex)mailIndexVector.elementAt(j);
     String id = index1.mailId;
     if(id.equals(index.mailId))
     count++;
     if(count == 0){
     File home = new File(".");
     String mailsRemark = "." + home.separator + "data";
     File datei = new File(mailsRemark, index.mailId);
     datei.delete();
     treeNewSign();
     menuNewSign();
     else{
     String t = (String)nodeInfo;
     boolean toDelete = false;
     for (int i=0; i<folderVector.size(); i++){
     if(folderVector.elementAt(i).equals(t)){
     folderVector.removeElement(t);
     konnteLoeschen = true;
     if(toDelete == false){
     message("This folder can not be deleted!");
     treeNewSign();
else
     message("Folder is not Empty! Please delete Your mails.");
else
message("No Mails where selected to be deleted!");
public void forward(){
if(from != null){
creatorOeffnen();
myCreator.tfSb.setText("Fwd to: " + subject);
myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
               "\n\n>\n>\n\n");
public void reply(){
if(from != null){
creatorOeffnen();
myCreator.tfTo.setText(from);
myCreator.tfSb.setText("Reply to: " + subject);
myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
               "\n\n>\n>\n\n");
public void end(){
String h = "";
for (int i=0; i<mailIndexVector.size(); i++){
MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
h += index.mailId + "\n";
h += index.folder + "\n";
h += index.subject + "\n";
h += index.from + "\n";
h += index.to + "\n";
h += index.date + "\n";
h += index.read + "\n";
myWriter.writer(h,"Summary.4on");
String w = "";
for (int l=0; l<filterIndexVector.size(); l++){
FilterIndex index = (FilterIndex)filterIndexVector.elementAt(l);
w += index.folder + "\n";
w += index.from + "\n";
w += index.text + "\n";
myWriter.write(w,"Filter.4on");
String k = "";
for(int j=0; j<folderVector.size(); j++)
k += folderVector.elementAt(j).toString() + "\n";
myWriter.writer(k,"Folder.4on");
String t = "";
for (int l=0; l<myAddressBook.addressIndexVector.size(); l++){
AddressIndex aindex =
     (AddressIndex)myAdressBook.adressIndexVector.elementAt(l);
t += aindex.alias + "\n";
t += aindex.email + "\n";
myWriter.write(t,"Address.4on");
setVisible(false);
dispose();
System.exit(0);
public void filterOpen(){
boolean test = false;
if(tree.getLastSelectedPathComponent() != null){
DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
Object nodeInfo = node.getUserObject();
if(nodeInfo instanceof String){
     myFilter.folder = (String)nodeInfo;
     for(int i=0; i<filterIndexVector.size(); i++){
     FilterIndex h = (FilterIndex)filterIndexVector.elementAt(i);
     if(h.folder.equals(nodeInfo)){
     myFilter.index = h;
     test = true;
     if(h.from.equals("")){
     myFilter.box1 = false;
     myFilter.fTf.setText("");
     myFilter.fBox.setSelected(false);
     myFilter.fTf.setEditable(false);
     else{
     myFilter.box1 = true;
     myFilter.fTf.setText(h.from);
     myFilter.fBox.setSelected(true);
     myFilter.fTf.setEditable(true);
     if(h.text.equals("")){
     myFilter.box2 = false;
     myFilter.tTf.setText("");
     myFilter.tBox.setSelected(false);
     myFilter.tTf.setEditable(false);
     else{
     myFilter.box2 = true;
     myFilter.tTf.setText(h.text);
     myFilter.tBox.setSelected(true);
     myFilter.tTf.setEditable(true);
     break;
myFilter.setVisible(true);
myFilter.fBox.requestFocus();
else
meldung("No selection");
public void sendOutbox(){
fromOutbox = true;
int i;
Block1:
for(i=0; i<mailIndexVector.size(); i++){
MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
if(index.folder.equals("Outbox")){
     Vector mailVector = myReader.read(index.mailId);
Block2:
     for(int j=0; j<mailVector.size(); j++){
     String m = (String)mailVector.elementAt(j);
     if(m.indexOf("Subject:") != -1){
     for(int k=0; k<=j+1; k++){
     mailVector.removeElementAt(0);
     break Block2;
     Vector toVector = new Vector();
     int tEnd = 1;
     String line = "";
     String t = index.to;
     while (tEnd != -1){
     tEnd = t.indexOf(", ");
     if (tEnd == -1)
     line = t;
     else
     line = t.substring(0,tEnd);
     t = t.substring(tEnd + 1);
     toVector.addElement(line);
     File home = new File(".");
     String mailsVerzeichnis = "." + home.separator + "data";
     File datei = new File(mailsRemark, index.mailId);
     datei.delete();
     mySendman = new Sendman(mailVector, toVector, index.subject,
     ailsAnzeig               mySetup, this);
     mySendman.start();
     mailIndexVector.removeElement(index);
     break Block1;
if(i == mailIndexVector.size())
fromOutbox = false;
treeNewSign();
public void partion(String cmd){
if(tree.getLastSelectedPathComponent() != null){
DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
Object nodeInfo = node.getUserObject();
if(nodeInfo instanceof MailIndex){
     MailIndex index = (MailIndex)nodeInfo;
     index.folder = cmd.substring(13).toString();
     treeNewSign();
else
meldung("No mails to partion!");
public void SetupOpen(){
if (mySetup.savePassword == false)
mySetup.pTf.setText("");
mySetup.setVisible(true);
mySetup.aTf.requestFocus();
public void addressbookOpen(){
myAddressBook.setVisible(true);
myAdressBook.tree.requestFocus();
public void creatorOpen(){
myCreator.setVisible(true);
myCreator.tfTo.requestFocus();
public void actionPerformed(ActionEvent event){
Object obj = event.getSource();
if (obj instanceof JMenuItem){
String cmd = event.getActionCommand();
if (cmd.equals("New fetched")){
     mailsfetch();
else if (cmd.equals("Written new mails")) {
     creatorOpen();
else if (cmd.equals("Reply")) {
     reply();
else if (cmd.equals("Forward")) {
     forward();
else if (cmd.equals("Outbox")) {
     sendOutbox();
else if (cmd.equals("Delete")) {
     delete();
else if ((cmd.length() >13) &&
     (cmd.substring(0,13).equals("Sorting-"))){
     sorting(cmd);
else if (cmd.equals("Using Addressbook")){
     addressbookOpen();
else if (cmd.equals("Filter working")){
     filterOpen();
else if (cmd.equals("New Order")){
     myFixTask.tf.setText("");
     myFixTask.setVisible(true);
     myFixTask.tf.requestFocus();
else if (cmd.equals("delete")){
     delete();
else if ((cmd.length() >7) &&
     (cmd.substring(0,7).equals("nobody"))){
     if(viewSource == false){
     viewSource = true;
     menuNewSign();
     if(tree.getLastSelectedPathComponent() != null){
     DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
     Object nodeInfo = node.getUserObject();
     if(nodeInfo instanceof MailIndex){
     MailIndex index = (MailIndex)nodeInfo;
     mailsRemark(index.mailId);
     else{
     viewSource = false;
     menuNeuZeichnen();
     if(tree.getLastSelectedPathComponent() != null){
     DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
     Object nodeInfo = node.getUserObject();
     if(nodeInfo instanceof MailIndex){
     MailIndex index = (MailIndex)nodeInfo;
     mailsRemark(index.mailId);
else if (cmd.equals("Setup")){
     SetupOpen();
else if (obj instanceof JButton){
String cmd = event.getActionCommand();
if (cmd.equals("aga")){
     mailsHolen();
else if (cmd.equals("Creator Open")){
     creatorOpem();
else if(cmd.equals("rep")){
     reply();
else if(cmd.equals("fwd")){
     forward();
else if(cmd.equals("Setup Open")){
SetupOpen();
else if(cmd.equals("adr")){
     addressbookOpen();
else if(cmd.equals("delete")){
     delete();
else if(cmd.equals("Information")){
     myInfo.setVisible(true);
     myInfo.b.requestFocus();
private class myWindowListener extends WindowAdapter{
public void windowClosing(WindowEvent event){
end();
private class myTreeSelectionListener implements TreeSelectionListener{
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node =
     (DefaultMutableTreeNode)(e.getPath().getLastPathComponent());
Object nodeInfo = node.getUserObject();
if(nodeInfo instanceof MailIndex){
     MailIndex index = (MailIndex)nodeInfo;
     mailsAnzeigen(index.mailId);
     index.read = "Yes";

Some suggestions:
1. as the others stated- you should really post specific questions rather than 1 huge ugly class!
2. use code tags
3. get a decent IDE- it would take about 1 minute to then see where the error is-
4. the rrors were just misspelled 'synchronized' and missing argument ','
5. Try not to make such huge classes!!- Try to follow certain coding "patterns"- like MVC- and not stick everything in 1 class- separate the functionality- it makes coding much easier!
here is fixed code (at least gets rid of those last errors):
import java.io.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
public class MailClient extends JFrame implements ActionListener{
  private Sendman mySendman;
  private Letterman myLetterman;
  public Writer myWrite;
  public Reader myReader;
  public Composer myComposer;
  private Setup mySetup;
  public Addressbook myAdressbook;
  private FixTask myFixTask;
  private Filter myFilter;
  private Info myInfo;
  public Vector mailIndexVector = new Vector();
  public Vector filterIndexVector = new Vector();
  public Vector folderVector = new Vector();
  private JPanel tArea, trae, icon, tField;
  private JTextArea ta;
  private JScrollPane view, treeScroll;
  private JTree tree;
  public JTextField tf;
  private JSplitPane split;
  private Dimension Size;
  private MailClient myMailClient;
  private String mailBody, subject, from;
  public boolean fromOutbox = false;
  public boolean viewSource = false;
  public static void main (String[] args) {
    MailClient myMailClient = new MailClient();
  public MailClient() {
    super("Mail-Client");
    ImageIcon linux = new ImageIcon("linux.gif");
    this.setIconImage(linux.getImage());
    icon = new JPanel();
    icon.setLayout(new FlowLayout(FlowLayout.LEFT));
    ImageIcon neu = new ImageIcon("getmail.gif");
    JButton neueMails = new JButton(neu);
    newMails.setActionCommand("Getting new Mails");
    newMails.addActionListener(this);
    newMails.setBorderPainted(false);
    newMails.setToolTipText("Getting new Mails");
    ImageIcon cr = new ImageIcon("creator.gif");
    JButton creator = new JButton(cr);
    creator.setActionCommand("Creator open");
    creator.addActionListener(this);
    creator.setBorderPainted(false);
    creator.setToolTipText("Creator open");
    JButton rep = new JButton(new ImageIcon("reply.gif"));
    rep.setActionCommand("rep");
    rep.addActionListener(this);
    rep.setBorderPainted(false);
    rep.setToolTipText("Reply");
    JButton fwd = new JButton(new ImageIcon("fwd.gif"));
    fwd.setActionCommand("fwd");
    fwd.addActionListener(this);
    fwd.setBorderPainted(false);
    fwd.setToolTipText("Forward");
    JButton ein = new JButton(new ImageIcon("settings.gif"));
    ein.setActionCommand("settings open");
    ein.addActionListener(this);
    ein.setBorderPainted(false);
    ein.setToolTipText("Setting open");
    JButton adr = new JButton(new ImageIcon("adressbook.gif"));
    adr.setActionCommand("adr");
    adr.addActionListener(this);
    adr.setBorderPainted(false);
    adr.setToolTipText("Addressbook");
    JButton lo = new JButton(new ImageIcon("trash.gif"));
    lo.setActionCommand("trash");
    lo.addActionListener(this);
    lo.setBorderPainted(false);
    lo.setToolTipText("trash");
    JButton in = new JButton(new ImageIcon("info.gif"));
    in.setActionCommand("Information");
    in.addActionListener(this);
    in.setBorderPainted(false);
    in.setToolTipText("Information");
    icon.add(newMails);
    icon.add(creator);
    icon.add(rep);
    icon.add(fwd);
    icon.add(set);
    icon.add(adr);
    icon.add(lo);
    icon.add(in);
    Vector h1 = myLeser.lese("Summary.4on");
    for(int i=0; i<h1.size(); i+=7){
      String id = h1.elementAt(i).toString();
      String fo = h1.elementAt(i+1).toString();
      String su = h1.elementAt(i+2).toString();
      String fr = h1.elementAt(i+3).toString();
      String to = h1.elementAt(i+4).toString();
      String da = h1.elementAt(i+5).toString();
      String re = h1.elementAt(i+6).toString();
      MailIndex index = new MailIndex(id, fo, su, fr, to, da, re);
      mailIndexVector.addElement(index);
    Vector h2 = myReader.read("Filter.4on");
    for(int j=0; j<h2.size(); j+=3){
      String fo = h2.elementAt(j).toString();
      String from = h2.elementAt(j+1).toString();
      String te = h2.elementAt(j+2).toString();
      FilterIndex index = new FilterIndex(fo, from, te);
      filterIndexVector.addElement(index);
    folderVector = myReader.read("Folder.4on");
    DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
    top = new DefaultMutableTreeNode("mails");
    top.add(inbox = new DefaultMutableTreeNode("Inbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Inbox"))
        inbox.add(new DefaultMutableTreeNode(m));
    top.add(outbox = new DefaultMutableTreeNode("Outbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Outbox")){
        outbox.add(new DefaultMutableTreeNode(m));
    top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Sentbox"))
        sentbox.add(new DefaultMutableTreeNode(m));
    for(int j=0; j<folderVector.size(); j++){
      top.add(trash =
      new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
      for(int i=0; i<mailIndexVector.size(); i++){
        MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
        if (m.folder.equals(folderVector.elementAt(j).toString()))
          trash.add(new DefaultMutableTreeNode(m));
    tree = new JTree(top);
    tree.getSelectionModel().setSelectionMode
    (TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.addTreeSelectionListener(new myTreeSelectionListener());
    treeScroll = new JScrollPane(tree);
    treeScroll.setFont(new Font("Monospaced",Font.PLAIN,6));
    baum.add("Center", treeScroll);
    MainMenu menuBar = new MainMenu(this, this);
    setJMenuBar(menuBar);
    setVisible(true);
  public void mailsFetcher() {
    myLetterman = new Letterman(this, mySetup);
    myLetterman.start();
  public void treeNewSign(){
    trae.remove(treeScroll);
    DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
    top = new DefaultMutableTreeNode("mails");
    top.add(inbox = new DefaultMutableTreeNode("Inbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Inbox"))
        inbox.add(new DefaultMutableTreeNode(m));
    top.add(outbox = new DefaultMutableTreeNode("Outbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Outbox"))
        outbox.add(new DefaultMutableTreeNode(m));
    top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
      MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
      if (m.folder.equals("Sentbox"))
        sentbox.add(new DefaultMutableTreeNode(m));
    for(int j=0; j<folderVector.size(); j++){
      top.add(trash =
      new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
      for(int i=0; i<mailIndexVector.size(); i++){
        MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
        if (m.folder.equals(folderVector.elementAt(j).toString()))
          trash.add(new DefaultMutableTreeNode(m));
    tree = new JTree(top);
    tree.getSelectionModel().setSelectionMode
    (TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.addTreeSelectionListener(new myTreeSelectionListener());
    treeScroll = new JScrollPane(tree);
    trae.add("Center", treeScroll);
    trae.repaint();
    setVisible(true);
  public void menuNewSign(){
    setJMenuBar(new MainMenu(this, this));
    setVisible(true);
  public String fromFilter (String t){
    String myFrom = "";
    int start, end;
    int a = t.indexOf("From:");
    if (a != -1){
      start = a + 6;
      ende = t.indexOf("\n",start);
      myFrom = t.substring(start,end);
    return myFrom;
  public String toFilter (String t){
    String myTo = "";
    int start, e1, e2, end;
    int a = t.indexOf("To:");
    if (a != -1){
      start = a + 4;
      end = t.indexOf("\n",start);
      myTo = t.substring(start,end);
      e1 = end + 1;
      if(t.substring(e1,e1+1).equals(" ")){
        while(t.substring(e1,e1+1).equals(" ")){
          while(t.substring(e1,e1+1).equals(" "))
            e1++;
          e2 = t.indexOf("\n",e1);
          myTo += " " + t.substring(e1,e2);
          e1 = e2 + 1;
    return myTo;
  public String dateFilter (String t){
    String myDate = "";
    int start, end;
    int a = t.indexOf("Date:");
    if (a != -1){
      start = a + 6;
      end = t.indexOf("\n",start);
      myDate = t.substring(start,end);
    return myDate;
  public String subjectFilter (String t){
    String mySubject = "";
    int start, end;
    int a = t.indexOf("Subject:");
    if (a != -1){
      start = a + 9;
      end = t.indexOf("\n",start);
      mySubject = t.substring(start,end);
    return mySubject;
  public String mailFilter (String t){
    String myMail = "";
    int start = 0, end = t.length();
    start = t.indexOf("\n\n") + 2;
    if (start != 1){
      int a = t.indexOf("\n\n" ,start);
      if (a != -1){
        if (t.indexOf(".",a+2) == a+2)
          if (t.indexOf("\n",a+3) == a+3)
            start = a;
      myMail = t.substring(start,end);
    return myMail;
  public void mailsRemark(String file){
    String mail = "", t = "";
    Vector mailVector = myReader.read(file);
    for (int i=0; i<mailVector.size(); i++)
      t += (String)mailVector.elementAt(i) + "\n";
    from = fromFilter(t);
    subject = subjectFilter(t);
    mailBody = mailFilter(t);
    mail += "Subject: " + subject + "\n";
    mail += "Date: " + dateFilter(t) + "\n";
    mail += "From: " + from + "\n";
    mail += "To: " + toFilter(t) + "\n";
    mail += "\n" + mailBody;
    if(viewSource == true)
      ta.setText(t);
    else
      ta.setText(mail);
  public synchronized void mails(String t){
    Status myStatus = new Status(this,t);
    myStatus.start();
  public void delete(){
    if(tree.getLastSelectedPathComponent() != null){
      DefaultMutableTreeNode node =
          (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
      if(node.isLeaf()){
        Object nodeInfo = node.getUserObject();
        if(nodeInfo instanceof MailIndex){
          MailIndex index = (MailIndex)nodeInfo;
          mailIndexVector.removeElement(index);
          int count = 0;
          for(int j=0; j<mailIndexVector.size(); j++){
            MailIndex index1 = (MailIndex)mailIndexVector.elementAt(j);
            String id = index1.mailId;
            if(id.equals(index.mailId))
              count++;
          if(count == 0){
            File home = new File(".");
            String mailsRemark = "." + home.separator + "data";
            File datei = new File(mailsRemark, index.mailId);
            datei.delete();
          treeNewSign();
          menuNewSign();
        else{
          String t = (String)nodeInfo;
          boolean toDelete = false;
          for (int i=0; i<folderVector.size(); i++){
            if(folderVector.elementAt(i).equals(t)){
              folderVector.removeElement(t);
              konnteLoeschen = true;
          if(toDelete == false){
            message("This folder can not be deleted!");
          treeNewSign();
      else
        message("Folder is not Empty! Please delete Your mails.");
    else
      message("No Mails where selected to be deleted!");
  public void forward(){
    if(from != null){
      creatorOeffnen();
      myCreator.tfSb.setText("Fwd to: " + subject);
      myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                           "\n\n>\n>\n\n");
  public void reply(){
    if(from != null){
      creatorOeffnen();
      myCreator.tfTo.setText(from);
      myCreator.tfSb.setText("Reply to: " + subject);
      myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                           "\n\n>\n>\n\n");
  public void end(){
    String h = "";
    for (int i=0; i<mailIndexVector.size(); i++){
      MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
      h += index.mailId + "\n";
      h += index.folder + "\n";
      h += index.subject + "\n";
      h += index.from + "\n";
      h += index.to + "\n";
      h += index.date + "\n";
      h += index.read + "\n";
    myWriter.writer(h,"Summary.4on");
    String w = "";
    for (int l=0; l<filterIndexVector.size(); l++){
      FilterIndex index = (FilterIndex)filterIndexVector.elementAt(l);
      w += index.folder + "\n";
      w += index.from + "\n";
      w += index.text + "\n";
    myWriter.write(w,"Filter.4on");
    String k = "";
    for(int j=0; j<folderVector.size(); j++)
      k += folderVector.elementAt(j).toString() + "\n";
    myWriter.writer(k,"Folder.4on");
    String t = "";
    for (int l=0; l<myAddressBook.addressIndexVector.size(); l++){
      AddressIndex aindex =
               (AddressIndex)myAdressBook.adressIndexVector.elementAt(l);
      t += aindex.alias + "\n";
      t += aindex.email + "\n";
    myWriter.write(t,"Address.4on");
    setVisible(false);
    dispose();
    System.exit(0);
  public void filterOpen(){
    boolean test = false;
    if(tree.getLastSelectedPathComponent() != null){
      DefaultMutableTreeNode node =
          (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
      Object nodeInfo = node.getUserObject();
      if(nodeInfo instanceof String){
        myFilter.folder = (String)nodeInfo;
        for(int i=0; i<filterIndexVector.size(); i++){
          FilterIndex h = (FilterIndex)filterIndexVector.elementAt(i);
          if(h.folder.equals(nodeInfo)){
            myFilter.index = h;
            test = true;
            if(h.from.equals("")){
              myFilter.box1 = false;
              myFilter.fTf.setText("");
              myFilter.fBox.setSelected(false);
              myFilter.fTf.setEditable(false);
            else{
              myFilter.box1 = true;
              myFilter.fTf.setText(h.from);
              myFilter.fBox.setSelected(true);
              myFilter.fTf.setEditable(true);
            if(h.text.equals("")){
              myFilter.box2 = false;
              myFilter.tTf.setText("");
              myFilter.tBox.setSelected(false);
              myFilter.tTf.setEditable(false);
            else{
              myFilter.box2 = true;
              myFilter.tTf.setText(h.text);
              myFilter.tBox.setSelected(true);
              myFilter.tTf.setEditable(true);
            break;
      myFilter.setVisible(true);
      myFilter.fBox.requestFocus();
    else
      meldung("No selection");
  public void sendOutbox(){
    fromOutbox = true;
    int i;
    Block1:
    for(i=0; i<mailIndexVector.size(); i++){
      MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
      if(index.folder.equals("Outbox")){
        Vector mailVector = myReader.read(index.mailId);
        Block2:
        for(int j=0; j<mailVector.size(); j++){
          String m = (String)mailVector.elementAt(j);
          if(m.indexOf("Subject:") != -1){
            for(int k=0; k<=j+1; k++){
              mailVector.removeElementAt(0);
            break Block2;
        Vector toVector = new Vector();
        int tEnd = 1;
        String line = "";
        String t = index.to;
        while (tEnd != -1){
          tEnd = t.indexOf(", ");
          if (tEnd == -1)
            line = t;
          else
            line = t.substring(0,tEnd);
          t = t.substring(tEnd + 1);
          toVector.addElement(line);
        File home = new File(".");
        String mailsVerzeichnis = "." + home.separator + "data";
        File datei = new File(mailsRemark, index.mailId);
        datei.delete();
        mySendman = new Sendman(mailVector, toVector, index.subject,ailsAnzeig, mySetup, this);
        mySendman.start();
        mailIndexVector.removeElement(index);
        break Block1;
    if(i == mailIndexVector.size())
      fromOutbox = false;
    treeNewSign();
  public void partion(String cmd){
    if(tree.getLastSelectedPathComponent() != null){
      DefaultMutableTreeNode node =
          (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
      Object nodeInfo = node.getUserObject();
      if(nodeInfo instanceof MailIndex){
        MailIndex index = (MailIndex)nodeInfo;
        index.folder = cmd.substring(13).toString();
        treeNewSign();
    else
      meldung("No mails to partion!");
  public void SetupOpen(){
    if (mySetup.savePassword == false)
      mySetup.pTf.setText("");
    mySetup.setVisible(true);
    mySetup.aTf.requestFocus();
  public void addressbookOpen(){
    myAddressBook.setVisible(true);
    myAdressBook.tree.requestFocus();
  public void creatorOpen(){
    myCreator.setVisible(true);
    myCreator.tfTo.requestFocus();
  public void actionPerformed(ActionEvent event){
    Object obj = event.getSource();
    if (obj instanceof JMenuItem){
      String cmd = event.getActionCommand();
      if (cmd.equals("New fetched")){
        mailsfetch();
      else if (cmd.equals("Written new mails")) {
        creatorOpen();
      else if (cmd.equals("Reply")) {
        reply();
      else if (cmd.equals("Forward")) {
        forward();
      else if (cmd.equals("Outbox")) {
        sendOutbox();
      else if (cmd.equals("Delete")) {
        delete();
      else if ((cmd.length() >13) &&
               (cmd.substring(0,13).equals("Sorting-"))){
        sorting(cmd);
      else if (cmd.equals("Using Addressbook")){
        addressbookOpen();
      else if (cmd.equals("Filter working")){
        filterOpen();
      else if (cmd.equals("New Order")){
        myFixTask.tf.setText("");
        myFixTask.setVisible(true);
        myFixTask.tf.requestFocus();
      else if (cmd.equals("delete")){
        delete();
      else if ((cmd.length() >7) &&
               (cmd.substring(0,7).equals("nobody"))){
        if(viewSource == false){
          viewSource = true;
          menuNewSign();
          if(tree.getLastSelectedPathComponent() != null){
            DefaultMutableTreeNode node =
                (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
            Object nodeInfo = node.getUserObject();
            if(nodeInfo instanceof MailIndex){
              MailIndex index = (MailIndex)nodeInfo;
              mailsRemark(index.mailId);
        else{
          viewSource = false;
          menuNeuZeichnen();
          if(tree.getLastSelectedPathComponent() != null){
            DefaultMutableTreeNode node =
                (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
            Object nodeInfo = node.getUserObject();
            if(nodeInfo instanceof MailIndex){
              MailIndex index = (MailIndex)nodeInfo;
              mailsRemark(index.mailId);
      else if (cmd.equals("Setup")){
        SetupOpen();
    else if (obj instanceof JButton){
      String cmd = event.getActionCommand();
      if (cmd.equals("aga")){
        mailsHolen();
      else if (cmd.equals("Creator Open")){
        creatorOpem();
      else if(cmd.equals("rep")){
        reply();
      else if(cmd.equals("fwd")){
        forward();
      else if(cmd.equals("Setup Open")){
        SetupOpen();
      else if(cmd.equals("adr")){
        addressbookOpen();
      else if(cmd.equals("delete")){
        delete();
      else if(cmd.equals("Information")){
        myInfo.setVisible(true);
        myInfo.b.requestFocus();
  private class myWindowListener extends WindowAdapter{
    public void windowClosing(WindowEvent event){
      end();
  private class myTreeSelectionListener implements TreeSelectionListener{
    public void valueChanged(TreeSelectionEvent e) {
      DefaultMutableTreeNode node =
          (DefaultMutableTreeNode)(e.getPath().getLastPathComponent());
      Object nodeInfo = node.getUserObject();
      if(nodeInfo instanceof MailIndex){
        MailIndex index = (MailIndex)nodeInfo;
        mailsAnzeigen(index.mailId);
        index.read = "Yes";
}

Similar Messages

  • Trouble compiling web service client file

    Hi,
    I am trying to deploy a test web services implementation on JBoss 3.2.1 and Axis 1.1RC2. The problem is, I cannot even compile my client code (the one that invoke the web services)...it seems that the java compiler cannot locate the following packages:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    even though I have set my classpath (in the environment var part of my Win2k box) to: C:\axis-1_1RC2\lib\axis.jar;C:\axis-1_1RC2\lib\jaxrpc.jar;C:\axis-1_1RC2\lib\saaj.jar;C:\axis-1_1RC2\lib\commons-logging.jar;C:\axis-1_1RC2\lib\commons-discovery.jar;C:\axis-1_1RC2\lib\wsdl4j.jar;C:\axis-1_1RC2\lib\;C:\axis-1_1RC2\[rest of classpath truncated]
    Has anyone experienced something similar? I'll award Duke dollars to the first person getting the right solution. Thanks!
    Here are the error messages:
    C:\web_clients>javac DataUserClient.java
    DataUserClient.java:1: package org.apache.axis.client does not exist
    import org.apache.axis.client.Call;
    ^
    DataUserClient.java:2: package org.apache.axis.client does not exist
    import org.apache.axis.client.Service;
    ^
    DataUserClient.java:3: package javax.xml.namespace does not exist
    import javax.xml.namespace.QName;
    ^
    DataUserClient.java:26: cannot resolve symbol
    symbol : class Service
    location: class DataUserClient
    Service myWebServ= new Service(url, "StandardPersonData");
    ^
    DataUserClient.java:26: cannot resolve symbol
    symbol : class Service
    location: class DataUserClient
    Service myWebServ= new Service(url, "StandardPersonData");
    ^
    DataUserClient.java:27: cannot resolve symbol

    Hi,
    I had the same problem with my client too. The problem is with your classpath. You have to set it at the command prompt as well as editing the setclasspath.bat file. The full path to where you libs are stored is required. eg:
    set classpath=%classpath%;C:\axis-1_1\lib\axis.jar;C:\axis-1_1\lib\jaxrpc.jar...etc
    I tried to set the classpath using %axisDirectory%\lib\axis.jar ...etc but it didnt work for whatever reason. The above method seems to eliminate all errors. At the moment im just running axis 1.1 under tomcat 4.1.
    Hope that helps :-)

  • Driver to email client not working

    For my class we are attempting to write our own email client. Our professor gave us the following driver. However when I attempt to compile the driver I get these errors:
    MailClient.java:125: cannot find symbol
    symbol  : variable envelope
    location: class MailClient.SendListener
                   SMTPConnection connection = new SMTPConnection(envelope);
                                                                  ^
    MailClient.java:126: cannot find symbol
    symbol  : variable envelope
    location: class MailClient.SendListener
                   connection.send(envelope);Admittedly it could be something with the SMPTConnection code, as that is what we had to write. However I would have expected it to throw some sort of exception in there and it does not. Any help to figure out why the driver is not working would be appreciatted.
    Code:
      import java.io.*;
       import java.net.*;
       import java.awt.*;
       import java.awt.event.*;
    /* $Id: MailClient.java,v 1.7 1999/07/22 12:07:30 kangasha Exp $ */
    * A simple mail client with a GUI for sending mail.
    * @author Jussi Kangasharju
        public class MailClient extends Frame {
        /* The stuff for the GUI. */
          private Button btSend = new Button("Send");
          private Button btClear = new Button("Clear");
          private Button btQuit = new Button("Quit");
          private Label serverLabel = new Label("Local mailserver:");
          private TextField serverField = new TextField("", 40);
          private Label fromLabel = new Label("From:");
          private TextField fromField = new TextField("", 40);
          private Label toLabel = new Label("To:");
          private TextField toField = new TextField("", 40);
          private Label subjectLabel = new Label("Subject:");
          private TextField subjectField = new TextField("", 40);
          private Label messageLabel = new Label("Message:");
          private TextArea messageText = new TextArea(10, 40);
         * Create a new MailClient window with fields for entering all
         * the relevant information (From, To, Subject, and message).
           public MailClient() {
             super("Java Mailclient");
          /* Create panels for holding the fields. To make it look nice,
          create an extra panel for holding all the child panels. */
             Panel serverPanel = new Panel(new BorderLayout());
             Panel fromPanel = new Panel(new BorderLayout());
             Panel toPanel = new Panel(new BorderLayout());
             Panel subjectPanel = new Panel(new BorderLayout());
             Panel messagePanel = new Panel(new BorderLayout());
             serverPanel.add(serverLabel, BorderLayout.WEST);
             serverPanel.add(serverField, BorderLayout.CENTER);
             fromPanel.add(fromLabel, BorderLayout.WEST);
             fromPanel.add(fromField, BorderLayout.CENTER);
             toPanel.add(toLabel, BorderLayout.WEST);
             toPanel.add(toField, BorderLayout.CENTER);
             subjectPanel.add(subjectLabel, BorderLayout.WEST);
             subjectPanel.add(subjectField, BorderLayout.CENTER);
             messagePanel.add(messageLabel, BorderLayout.NORTH);     
             messagePanel.add(messageText, BorderLayout.CENTER);
             Panel fieldPanel = new Panel(new GridLayout(0, 1));
             fieldPanel.add(serverPanel);
             fieldPanel.add(fromPanel);
             fieldPanel.add(toPanel);
             fieldPanel.add(subjectPanel);
          /* Create a panel for the buttons and add listeners to the
          buttons. */
             Panel buttonPanel = new Panel(new GridLayout(1, 0));
             btSend.addActionListener(new SendListener());
             btClear.addActionListener(new ClearListener());
             btQuit.addActionListener(new QuitListener());
             buttonPanel.add(btSend);
             buttonPanel.add(btClear);
             buttonPanel.add(btQuit);
          /* Add, pack, and show. */
             add(fieldPanel, BorderLayout.NORTH);
             add(messagePanel, BorderLayout.CENTER);
             add(buttonPanel, BorderLayout.SOUTH);
             pack();
             show();
           static public void main(String argv[]) {
             new MailClient();
        /* Handler for the Send-button. */
           class SendListener implements ActionListener {
              public void actionPerformed(ActionEvent event) {
                System.out.println("Sending mail");
             /* Check that we have the local mailserver */
                if ((serverField.getText()).equals("")) {
                   System.out.println("Need name of local mailserver!");
                   return;
             /* Check that we have the sender and recipient. */
                if((fromField.getText()).equals("")) {
                   System.out.println("Need sender!");
                   return;
                if((toField.getText()).equals("")) {
                   System.out.println("Need recipient!");
                   return;
             /* Create the message */
                Message mailMessage = new Message(fromField.getText(),
                         toField.getText(),
                         subjectField.getText(),
                         messageText.getText());
             /* Check that the message is valid, i.e., sender and
              recipient addresses look ok. */
                if(!mailMessage.isValid()) {
                   return;
             /* Create the envelope, open the connection and try to send
              the message. */
                try {
                   Envelope envelope = new Envelope(mailMessage, serverField.getText());
                    catch (UnknownHostException e) {
                   /* If there is an error, do not go further */
                      return;
                try {
                   SMTPConnection connection = new SMTPConnection(envelope);
                   connection.send(envelope);
                   connection.close();
                    catch (IOException error) {
                      System.out.println("Sending failed: " + error);
                      return;
                System.out.println("Mail sent succesfully!");
        /* Clear the fields on the GUI. */
           class ClearListener implements ActionListener {
              public void actionPerformed(ActionEvent e) {
                System.out.println("Clearing fields");
                fromField.setText("");
                toField.setText("");
                subjectField.setText("");
                messageText.setText("");
        /* Quit. */
           class QuitListener implements ActionListener {
              public void actionPerformed(ActionEvent e) {
                System.exit(0);
       }

    This is what I mean:
    /* Create the envelope, open the connection and try to send the message. */
               Envelope envelope = null;
                try {
                     envelope = new Envelope(mailMessage, serverField.getText());
                    catch (UnknownHostException e) {
                   /* If there is an error, do not go further */
                      return;
                try {
                   SMTPConnection connection = new SMTPConnection(envelope);
                   connection.send(envelope);
                   connection.close();
                    catch (IOException error) {
                      System.out.println("Sending failed: " + error);
                      return;
                System.out.println("Mail sent succesfully!");

  • Which email clients work

    Hi,
    For years I used Apple Mail using Mac OS10.68 as my default mail program for sending pdfs directly from the pdf panel. I am having trouble with Apple Mail (this issue has nothing to do with sending pdfs) and have tried several other email clients - thunderbird, postbox, opera with Acrobat and none appear to work. Can someone suggest an email client that works the pdf panel?
    Thank you,
    Meryl

    Hi Meryl,
    What version of Acrobat / Reader are you using?
    You can use any of the email clients listed above.
    Try the step mentioned in the thread : http://forums.adobe.com/message/5784474
    Regards,
    Rave

  • Can I set gmail as my default email client?

    I am having trouble with Apple Mail and would prefer to use gmail as my default email client. Is there any way to do that in aperture?

    Gmail is not a Mail Client. It's a mail service that needs a client to access it. That client can be a Web Browser, or an app like Mail, Entourage, Thunderbird etc. So, no you cannot set Gmail as the default email client. It's a bit like saying can I make HBO my Television Set.
    If you want to use an app as default mail client in Aperture then the chosen app has to be scriptable, and that limits your options. There are only four supported: Mail, Entourage, AOL and Eudora.
    Alternatively, you can access the Library from any Mail client or service via their Attach options:
    In any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    *+(Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)+*
    Or any Media Browser.
    Regards
    TD

  • Trouble verifying the email for enewsletter

    Hi there, I am trying to set up an email campaign for my client, however I am having trouble verifying the email which it is to be sent from. The 'confirm' button does not work.
    Any help / suggestions welcome...

    Hi Leigh,
    I recommend trying another browser to see if the 'confirm' button will then work. Otherwise, please reach out to support via the admin console of your site > Help & Support and we will be able to verify your email address for you.

  • Trouble Setting up Email

    I am having trouble setting up my email account on both my Mac and my ipad.  Both will receive emails but neither will connect to the server to send.  My Incoming Server and Outgoing Server is the same.  I have this email account set up on my PC Microsoft Exchange and have no problems.  I am not sure what I am doing wrong but both the Mac and ipad is having the same problem.  I have deleted the mail accounts and retried several times.  Help please.

    You need to contact your school's IT department or whichever dept. is responsible for setting up email accounts for students to get the required account setup information in order to access the account with an email client and not webmail.
    You are currently accesssing the account via webmail using a browser and you need the account settings required for accessing the account with an email client - be sure to use this term.
    You need the following:
    Account Type: POP or IMAP
    Incoming mail server
    User name format - usually the portion of your email address in front of the @ sign only but sometimes it is your entire email address depending on the email account provider.
    Password - this you already know.
    Outgoing Mail Server or SMTP server and is the SMTP server authenticated just as the incoming mail server. Server Port for the SMTP server - 25 is the default for SMTP servers but it might be 587.
    Is SSL (Secure Sockets Layer) supported and/or required for the incoming and outgoing mail server.

  • IOS 6.1.4 - Apple Native Email Client - Push Notification is not working

    Hi, I just upgraded to IOS 6.1.4 this morning no issues Upgrade went well.
    Now My Email Push Notfication is not working.
    1. Bussiness Gmail Account - Configured as Exchange
    2. Hotmail Account - Configured as Exchange
    Both Account - Push is ON
    if some one send email i am not getting it. I have to manually open the Native Email client then i can see.
    Restarted the IPhone Twice.
    Any one facing similar issue?

    1.   Removed the Email Account and Added again - Problem Presist.
    2.   Erase All Content - Restored from previous Backup - No Luck
    3.   Again Erased All Content - Setup as New Phone - Just add Gmail Enterprise Email Account - Not Working.
    Surprisingly - Icloud / Hotmail PUSH Notifications works Fine.
    I have removed all My Devices from the Google Apps Administrator page and re-requeste for new deivce and then tried all the above still same Issues.
    Now what?
    Any one experiencing this issue?

  • I am having trouble sending bulk emails (less than 100 at a time) on my gmail account using group names created from my address book.  I use Mail on my I-Mac.  When I try to send out a bulk email, the message shows up that my server can't send them, etc.

    I am having trouble sending bulk emails from a Mail Group (less than 100 at a time) on my gmail account.  They come back saying the server can't recognize the data and try again with selected server or try later or edit message, all of which I have attempted a number of times, including re-booting the computer.  I am wondering if there is something wrong in my Address Book?  I have check Apple Preferences, and Mail Preferences and all seems in order.  I can send to any of the individual addresses, but not in a group.
    Thanks for your help.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • Two instances of Firefox open when I click on a link within my email client. How can I stop this from happening?

    I am running on an iMac OS X 10.6.3 using Firefox 3.6.3 as my default browser and I use Postbox 1.1.5 as my email client. Anytime I click on a link within an email message two instances of Firefox open, one with my home page and one with the site the link was meant for. This happens only when Firefox is not already open. If Firefox is running and a link is clicked on it opens normally within the open instance of Firefox. I have contacted Postbox and am currently awaiting a response to see if they have any suggestions. While this is not a serious issue it is a bit annoying. I have Firefox set to open new links in tabs not new instances of windows, so it shouldn't be that. Any help in getting this to stop would be greatly appreciated.
    == This happened ==
    Every time Firefox opened
    == Not sure, it's been going on for quite awhile.

    That is a bug on Mac.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=531552 - Firefox 3.6b opens two windows when opening external links
    ''(please do not comment in bug reports to avoid bug spam for the devs)''

  • Firefox will not open my email client when I click on a "mailto" link on any website. How can I fix this.

    Anytime I drag my cursor across, or try to click on a "mailto" email link on any webpage, it will display an incorrect e-mail address (it seems to default to one in particular). It will not open a new e-mail window and if I "copy e-mail address" it's the wrong one. I've tried everything and was hoping with new updates the problem would solve itself but obviously it hasn't.
    HELP ! This is driving me CRAZY

    For the settings to check to ensure that Firefox opens your email client, see [[changing the e-mail program used by Firefox]]. I don't know why it shows the wrong email address.

  • Email client problem with 11.0.3

    I recently upgraded to Reader 11.0.3 and evertime I lauch the application I get an error message along the lines: "This application has failed to start because GAPI32.dll was not found.  Re-intalling the application may fix this problem", followed by "Either there is no default email client or the current mail client cannot fulfil the messaging request.  Please run Microsoft Outlook and set it as the default mail client."
    I am running Windows XP SP3 with Outlook 2000 as the default mail client and have gone through the MS fix for missing GAPI32.  The point is, I DO NOT want Reader to email anything for me at any time.  I prefer to go into Outlook, prepare an email and attach a PDF.   Reader works okay but I am getting pretty cheesed off with having to OK the two error boxes everytime I open a PDF.
    Can I just remove the email facility from Reader?   In Edit|Preferences Email Accounts, I get "Default Mail Application (Microsoft Outlook)" but the delete button is greyed out.

    Timcarson1 in general the error message you received is accurate.  Have you tried applying the update under a local administrator account to see if you face the same difficulty?  If not then please work with your computer department to allow this test to occur.

  • How can I create a button to open email client and allow the user to e-mail pdf to a friend?

    I need to find a way to let our members share our marketing pdf files with their friends as an email attachment. I can only seem to find a way to send a mailto to a specific address. I am thinking that the form is the only way to create that possibility, but would be open to any help even if not by a form.

    Thanks you but I want the end user to be able to open my pdf file from my website and email it as an attachment to their family and friends. ( no specific email address assigned) I tried adding a empty mailto tag and it opens the email client, but no attachment. I don't think I am making my question understandable and maybe it is not possible to do this in Acrobat.

  • Is there a way to force href="mailto: to use the default email client

    I would like to use the href="mailto:" in my website to automatically open an email but the end user gets the message "There is no email program associated to perform the requested action..."
    Is there a way to force to the mailto to use the and user's default email client?
    Thank you for your help

    Hi James -
    That is the default behavior of browsers when handling the mailto link.
    Please keep in mind that nearly half of website visitors do not have an email client as they are using mobile devices or public computers or web-based email like Gmail, MSN mail etc.
    Please don't feed the spambots. Best practice is to use an HTML "form" in conjunction with a server-side forms processing script. Ask your hosting provider if they provide one for you.

  • TS3899 Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect

    Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect". Help

    Hotmail is having problems:
    http://bostinno.streetwise.co/2013/08/15/hotmail-outage-hotmail-is-down-for-user s-still-photos/
    http://www.engadget.com/2013/08/14/outlook-outage/
    http://www.infoworld.com/d/applications/microsofts-skydrive-outlookcom-are-down- some-users-224940
    http://mashable.com/2013/08/14/outlook-down/
    http://techcrunch.com/2013/08/14/microsoft-acknowledges-outlook-com-messenger-sk ydrive-outages/

Maybe you are looking for

  • Business Engine Requisition Queue is not available

    Hello, did anyone encounter the error I wrote in the title? I went to http://<Ciaca server>:8080/RequestCenter/businessengine/configdebug.jsp to check the business engine config, every thing seems fine. I'm going to use a clone/Backup of the VM where

  • Question on reporting

    Hi Friends ,                  Can I acheive this requirement in front end , since it is computation based I think its better if we do it over Backened. Actuallly I need to display a field in the report based on other keyfigure value . I have a Keyfig

  • My DVD Drive dosent work and its dented and i can't get my DVD out. I have apple care so would I be able to get it replaced?

    So I somehow dented my DVD drive for my macbook pro but I tried putting a disc if it would work (stupid idea) It went in but it now wont come out. I've been wanting to get to apple for a while about my DVD drive not working and now my DVD is stuck in

  • Website Page shows errors

    While I am trying to access the website www.bubblews.com, some ( not all ) of it's pages, show a specific error statement. The statement is: Database_Exception [ 0 ]: [1030] Got error 28 from storage engine ( SHOW FULL COLUMNS FROM `user_tokens` ) ~

  • Audio is intermittent playing on timeline in Premiere Pro CC

    audio plays for a few second then drops out when editing in the timeline. tried rendering audio and entire clip ...no improvement very experienced in APP and never had this annoying problem any help would be most appreciated running Win 7 on Mac Pro