Sending email in Android using your API example

Hi,

I try to send an email on Android platform using your asynchronous API example:

      AsyncCallback<object> responder = new AsyncCallback<object>(
        result =>
        {
          System.Console.WriteLine( "[ASYNC] message sent" );
        },

        fault =>
       {
          System.Console.WriteLine( "Error - " + fault );
        } );

      // async request. Plain text message to one recipient
      Backendless.Messaging.SendTextEmail( "Reminder", "Hey JB! Your car will be ready by 5pm", 
      "james.bond@mi6.co.uk", responder );

and the SendTextEmail method is not recognized by the compiler (AndroidStudio)!!

Using the asynchronous version on IOS, sending emails works perfectly for me.

Can you tell me if there is any error or omission in your code or if I am missing something?

Thanks and best regards,

Hello @joan-martinez

make sure you set up your env correctly, here is a doc you can follow Client-side Setup - Backendless SDK for Android/Java API Documentation

Regards, Vlad

Hi Vladimir,

Without making any changes to my configuration I have tried this “version” and it works correctly:

Backendless.Messaging.sendTextEmail(“subject of the mail”, “text to send”, “mailTo”, new AsyncCallback() {

     @Override
      public void handleResponse(Object response) {
           System.Console.WriteLine( "[ASYNC] message sent" );
      }

     @Override
     public void handleFault(BackendlessFault fault) {
          System.Console.WriteLine( "Error - " + fault );
     }

}
);

Regards,