Dukascopy
 
 
Wiki JStore Search Login

Type mismatch: cannot convert from Object to IEmailResponse
 Post subject: Type mismatch: cannot convert from Object to IEmailResponse Post rating: 0   New post Posted: Wed 29 Nov, 2017, 20:36 

User rating: 0
Joined: Tue 11 Oct, 2016, 16:41
Posts: 4
Hello, I'm trying to send e-mail. I've get this code from javadoc from dukascopy.
        try {
             // Note: not to hold up the strategy execution, consider calling the sending logic from another thread
             Future future = utils.sendMail("[email protected]", "Test mail subject", "Test mail \n Bye.");
             console.getOut().println("Waiting on response");
             IEmailResponse response = future.get(30, TimeUnit.SECONDS);
             if (response.isError()) {
                 console.getErr().println(response);
             } else {
                 console.getOut().println("e-mail successfully sent!");
             }
         } catch (Exception e) {
             e.printStackTrace(console.getErr());
         }

Unfortunately after compilation I get a message:
Quote:
Type mismatch: cannot convert from Object to IEmailResponse

Somebody have idea how to solve this problem?


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com