Languages

Menu
Sites
Language
Send eMail - NOT_SUPPORTED

Hello.

I´m creating a csv-file during prcessing my app.
Now I would like to send this by eMail.

I´ve done everything (I guess :-)) as described, but I always get EMAILS_ERROR_NOT_SUPPORTED on the first procedure (int email_create_message (email_h *email).

 

- Privileg in manifest ist defined
- eMail account available (can be used by standard eMail app)

 

Developing for Wearable V3.0.0
Device:       Samsung Gear S3

Any idea where the problem is comming from ?

Thx

Responses

14 Replies
Yasin Ali

Hi,

EMAILS_ERROR_NOT_SUPPORTED  means Not supported (Since 3.0)
check application code to find any API that is not supported.

To attach use:
int email_add_attach  ( email_h  email, 
  const char *  filepath 
 )

The maximum attachment file size is 10MB. http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.

Hope it'll help.

Claus Giehl

Unfortunately the additional privileges do not solve the problem.

Any other ideas or running examples from the community?

André Reus

Hello,

I think you may share your code such that anyone can test with that. 

Claus Giehl

Hi.

Enclosed example how I tried to solve it.

 

Manifest:

   <privileges>
        <privilege>http://tizen.org/privilege/mediastorage</privilege>
        <privilege>http://tizen.org/privilege/alarm.get</privilege>
        <privilege>http://tizen.org/privilege/haptic</privilege>
        <privilege>http://tizen.org/privilege/email</privilege>
        <privilege>http://tizen.org/privilege/alarm.set</privilege>
        <privilege>http://tizen.org/privilege/display</privilege>
    </privileges>

 

Code:

        // send csv-file
        email_h msg;
        char buf[1028];
        int i = 0, error_code = EMAILS_ERROR_NONE;

        error_code = email_create_message(&msg);
        if (error_code == EMAILS_ERROR_NONE)
        {
            error_code = email_add_recipient(msg, EMAIL_RECIPIENT_TYPE_TO, "info@swrist.de");
            i++;
        }
        if (error_code == EMAILS_ERROR_NONE)
        {
            error_code = email_add_attach(msg, buf);
            i++;
        }
        if (error_code == EMAILS_ERROR_NONE)
        {
            error_code = email_save_message(msg);
            i++;
        }
        if (error_code == EMAILS_ERROR_NONE)
        {
            error_code = email_set_message_sent_cb(msg, email_send_status, NULL);
            i++;
        }
        if (error_code == EMAILS_ERROR_NONE)
        {
            error_code = email_send_message(msg, false);
            i++;
        }

        if (error_code != EMAILS_ERROR_NONE)
        {
            snprintf (buf, 127, "Failure sending mail: Step %d", i);
            dlog_print(DLOG_ERROR, LOG_TAG, buf, error_code);
        }

As mentioned - failure is comming directly from "email_create_message(&msg)".

Best Regards
Claus Giehl

Yasin Ali

Hello,

I think you should follow this link for your dev guide https://developer.tizen.org/development/guides/native-application/messaging/email
Here I found:
Dependencies
•Tizen 2.4 and Higher for Mobile
•Tizen 3.0 and Higher for Wearable

Check for these also,

Claus Giehl

Hello Yasin Ali.

I worked 100% (I guess) according the guide and I´m using the latest Version on my Gear S3 with TIzen V3.0.0.2.

Answering on Mails by Gear with Mail-App is working.

Regards
cgiehl

Yasin Ali

It should work then. However give a reset of your device I think.

 

Claus Giehl

Hallo community.

I completely reseted the Gear S3 incl. setup of Mail-Account.
I also installed Tizen completely new. Still same effect.

Best Regards
cgiehl

Yasin Ali

Did you set up at least 1 email account on your device before sending an email?

Claus Giehl

I can send Mails with the eMail app.
An valid and working eMail-Account is available.

Best Regards
cgiehl

Claus Giehl

Hi.

I still have no solution, BUT I´ve seen that launching the mail app is only possible on mobile devices.

I would like to write an app sending an email from an wearable device.
Is this possible?

Best Regards
Claus Giehl

Thiago Rangel

Same problem here. I'm on native Tizen 4.0, running on a Galaxy Watch, and get EMAILS_ERROR_NOT_SUPPORTED when executing email_create_message(&mail). Anyone has any idea?

The guide says it should work on on Wearable devices:

https://developer.tizen.org/development/guides/native-application/messaging/email

Anyone has any suggestion on the easiest way to retrieve a CSV file that contains data logged from the sensors. E-mail would be ideal, as I would be able to download it from any device.

mommek

Hello, after almost 2 years I need open this topic.

Maybe someone have solution for this? I need simply send an e-mail with attachment from my wearable app not using connected mobile phone.