PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV Mobile 2024 → Sending email with Android
Sending email with Android
Started by Daniele Ferri, Oct., 27 2016 5:33 PM - 1 reply
Posted on October, 27 2016 - 5:33 PM
Hello from Italy and sorry for very bad English

I wrote an App for iOS, Android and W10, used
by 108 students of a College to communicate
with the Tutors: some very easy screens, with a
"send email" button

I well know that I must wait Windev 22 for a full
implementation of email function in the Android
environment, but I really need to give a reply about
this problem

I have these very simple lines of code

Email.Recipient = "gino.pilotino@server.it"
Email.Subject = "The email subject, for your eyes only"
Email.Message = var_message_text
EmailRunApp()

When my Android user click the button on the screen
the email application starts and a message window
is opened, ready for the sending, but...

the email recipient is empty!

During the tests only in one case (on a Samsung
phone with Outlook configured as email application)
the recipient field was correctly filled, in 99% of the
other cases it's always empty

I don't understand what is needed to fill the field

thanks for your help

Daniele

PS: I tried also with "Email.Recipient[1] = ... "
and nothing changes
Posted on October, 28 2016 - 11:16 AM
Hi Daniele,

the answer is very clear in the help on that fonction. THe example there
show this:

Email.Recipient[1] = "recipient@email.com"
Email.NbRecipient = 1
Email.Subject = "Subject of the message"
Email.Message = "Text of the message"
Email.Attach[1] = "/sdcard/photo.jpg"
Email.NbAttach = 1
EmailRunApp()

As you can see, your code does not take into account the fact that there
can be multiple recipient, and therefore that "email.recipient" is an ARRAY.

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 10/27/2016 à 9:33 AM, Daniele Ferri a écrit :
Hello from Italy and sorry for very bad English

I wrote an App for iOS, Android and W10, used
by 108 students of a College to communicate with the Tutors: some very
easy screens, with a
"send email" button
I well know that I must wait Windev 22 for a full
implementation of email function in the Android
environment, but I really need to give a reply about
this problem
I have these very simple lines of code

Email.Recipient = "gino.pilotino@server.it"
Email.Subject = "The email subject, for your eyes only"
Email.Message = var_message_text
EmailRunApp()

When my Android user click the button on the screen
the email application starts and a message window
is opened, ready for the sending, but...

the email recipient is empty!
During the tests only in one case (on a Samsung
phone with Outlook configured as email application)
the recipient field was correctly filled, in 99% of the other cases it's
always empty

I don't understand what is needed to fill the field

thanks for your help

Daniele

PS: I tried also with "Email.Recipient[1] = ... "
and nothing changes