Android Question MS Exchange Mail Mail no Reciever

hasexxl1988

Active Member
Licensed User
Longtime User
There is no error message, the recipient comes to nothing, and the app crashes also not expire. What am I doing wrong does not arrive, the e-mail? :(

B4X:
Sub Process_Globals
    Dim MailClient As SMTP
End Sub

Sub Activity_Create(FirstTime As Boolean)
    MailClient.Initialize ("mailserveradress",443,"x\user","password","MailClient")
    MailClient.StartTLSMode = True
    MailClient.Subject ="Test"
    MailClient.Body ="Test123"
    MailClient.Sender = "Sendermail"
    MailClient.To.Add("receivermailadress")
    MailClient.Send
    ToastMessageShow("Email Sent!",False)
End Sub

No Certificat Needed
 
Last edited:

hasexxl1988

Active Member
Licensed User
Longtime User
B4X:
Dim MailClient As SMTP
    MailClient.Initialize ("mailsync.exchange.com",443,"domain\user","Password","MailClient")
     MailClient.StartTLSMode =True
    MailClient.HtmlBody = False
    MailClient.Sender = "exchangemailadress"
    MailClient.To.Add("mail@gmail.com")
    MailClient.Subject ="Test"
    MailClient.Body ="Test123"
    MailClient.Send
    ToastMessageShow("Message Sent!",False)

I have the event at the start involved once for testing.

when sending via Gmail it works. in Exchange with Server, Domain, User and Password nothing.

How can i Handling the MessageSent-Event?
 
Upvote 0

hasexxl1988

Active Member
Licensed User
Longtime User
I can port and Username also change in incorrect data, yet it comes no error message from the event ... as said via gmail it works.
At Exchance has normal with any other email program access.

Can that are related to the security of the Exchange server? Because the smartphone you must first create a password before you can set up your Exchange account successfully (which was also set up)


EDIT:
Error after 30 Seconds in the Logfile: java.net.SocketTimeoutException

and SMTP_MessageSent Event:
Error sending message

NET Library V 1.62
B4A: V5.50
 
Last edited:
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Upvote 0

hasexxl1988

Active Member
Licensed User
Longtime User
I have now tried. With SMTP_AUTH (LOGIN, PLAIN and CRAM_MD5), SSL On/Off and StartTLS On/Off, and Ports 25, 443, 465 and 587

I have Access via Smartphone Mail App into the Mails, can Read and Sent via App, and HTTPS Web Access to the Mails.
 
Upvote 0

hasexxl1988

Active Member
Licensed User
Longtime User
The Exchange Access is via my company email address, not Gmail.
I'm not sure, because the smartphone Email Apps only server, domain, user name, password and port, no specific POP and SMTP data.


I have only Exchange Data, not POP, IMAP or SMTP.
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Here is my thoughts, you said "I have only Exchange Data, not POP, IMAP or SMTP." Microsoft Exchange uses MAPI Protocol. I don't believe the Net library supports MAPI per the apache documentation: http://commons.apache.org/proper/commons-net/

It does supports SMTP, On the server you have to allow authenticated users (using SMTP Protocol) on a certain port to send "Not Open Relay" through the port 25,26,443 etc... Also make sure the user has permissions to send messages.

"because the smartphone Email Apps only server, domain, user name, password and port, no specific POP and SMTP data."
Smartphone Email Apps are using the "MAPI Protocol"
That is how once you are connected to the exchange server, you can access the following:
Email, Calendar, Contacts, Task, Notes.

Hope this helps.
 
Upvote 0

hasexxl1988

Active Member
Licensed User
Longtime User
Thanks for the information
I get from our IT department the following reply:
Unfortunately there is no SMTP settings for the Exchange address.
SMTP has been disabled with the email policy.
Therefore mails are available only through Exchange.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
If they wont change the settings then you´re lost. No chance for your to get the mails with b4a then.
as of now i don´t think that there is no exchange-lib for b4a.
 
Upvote 0
Top