Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-07

Pascal units to connect to an Exchange server

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

luciano de souza

Hello all,

From a Linux machine connected to a Windows machine by VPN, I’d like

to send e-mails programmatically using a Microsoft Exchange account. Using Windows resources, I could call Outlook automation API to do this task. But is the same possible with Linux resources? Is there a Freepascal unit to handle with Exchange sending protocol? Best Regards,

Luciano de Souza Hello all, >From a Linux machine connected to a Windows machine by VPN, I’d like to send e-mails programmatically using a Microsoft Exchange account. Using Windows resources, I could call Outlook automation API to do this task. But is the same possible with Linux resources? Is there a Freepascal unit to handle with Exchange sending protocol? Best Regards,

Reply by email

Bo Berglund
to luciano de souza
luciano de souza wrote 7 lines
Hello all, From a Linux machine connected to a Windows machine by VPN, I’d like to send e-mails programmatically using a Microsoft Exchange account. Using Windows resources, I could call Outlook automation API to do this task. But is the same possible with Linux resources? Is there a Freepascal unit to handle with Exchange sending protocol? Best Regards,

Why not just use somethng like Indy10 to implement an smtp sending function?
It is quite simple and straightforward.
What exactly are you wanting to accomplish by mixing in Exchange and Outlook?????

Bo Berglund Developer in Sweden

Reply by email

Sven Barth
to Bo Berglund

Bo Berglund schrieb am Do., 19. Juli 2018, 21:52:

Show quoted text 17 lines
On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza wrote: >Hello all, >From a Linux machine connected to a Windows machine by VPN, I’d like >to send e-mails programmatically using a Microsoft Exchange account. >Using Windows resources, I could call Outlook automation API to do >this task. But is the same possible with Linux resources? >Is there a Freepascal unit to handle with Exchange sending protocol? >Best Regards, Why not just use somethng like Indy10 to implement an smtp sending function? It is quite simple and straightforward. What exactly are you wanting to accomplish by mixing in Exchange and Outlook?????

Just a guess, but it could be that the server the thread starter needs to work with doesn't provide a SMTP endpoint. 🤷‍♀️

Regards,
Sven

Reply by email

Sven Barth
to luciano de souza: to send e-mails programmatically using a Microsoft Exchange account. Using Windows…

luciano de souza schrieb am Do., 19. Juli 2018, 20:29:

Show quoted text 8 lines
Hello all, From a Linux machine connected to a Windows machine by VPN, I’d like to send e-mails programmatically using a Microsoft Exchange account. Using Windows resources, I could call Outlook automation API to do this task. But is the same possible with Linux resources? Is there a Freepascal unit to handle with Exchange sending protocol? Best Regards,

The underlying protocol of Exchange seems to be MAPI. So you could maybe try if libmapi is sufficient for you though you'll need to convert its corresponding C header to Pascal (you can try to use h2pas for that).

Regards,
Sven

Reply by email

luciano de souza
to Bo Berglund: On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza Why not just use somethng like…

Perhaps, this is the answer. In Outlook settings, I am not able to find SMTP. I got the url server and some proxy settings. NTLM was one of parameters set. If I don't have an SMTP endpoint, could I create a crawler to automate the http connection available in Outlook Web App? In other words, since I am able to use a web page to send e-mails, it's always true that I can automate it, can't I?
In this case, I should study the requests and responses and, by means of TFPHTTPVClient, to build something.

2018-07-19 16:51 GMT-03:00, Bo Berglund :

Show quoted text 25 lines
On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza wrote: >Hello all, >From a Linux machine connected to a Windows machine by VPN, I’d like >to send e-mails programmatically using a Microsoft Exchange account. >Using Windows resources, I could call Outlook automation API to do >this task. But is the same possible with Linux resources? >Is there a Freepascal unit to handle with Exchange sending protocol? >Best Regards, Why not just use somethng like Indy10 to implement an smtp sending function? It is quite simple and straightforward. What exactly are you wanting to accomplish by mixing in Exchange and Outlook????? -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Luciano de Souza

Reply by email

Bo Berglund
to luciano de souza
luciano de souza wrote 18 lines
2018-07-19 16:51 GMT-03:00, Bo Berglund : > On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza > wrote: > >>Hello all, > >From a Linux machine connected to a Windows machine by VPN, I’d like >>to send e-mails programmatically using a Microsoft Exchange account. >>Using Windows resources, I could call Outlook automation API to do >>this task. But is the same possible with Linux resources? >>Is there a Freepascal unit to handle with Exchange sending protocol? >>Best Regards, > > Why not just use somethng like Indy10 to implement an smtp sending > function? > It is quite simple and straightforward. > What exactly are you wanting to accomplish by mixing in Exchange and > Outlook?????

-- moved top post to bottom ---

Perhaps, this is the answer. In Outlook settings, I am not able to find SMTP.

In Outlook this is the "outgoing mail" settings.... If you find the server, logon account and protocol (SSL etc) in Outlook settings then you can use those with the Indy10 TIdSmtp component.

Show quoted text 7 lines
I got the url server and some proxy settings. NTLM was one of parameters set. If I don't have an SMTP endpoint, could I create a crawler to automate the http connection available in Outlook Web App? In other words, since I am able to use a web page to send e-mails, it's always true that I can automate it, can't I? In this case, I should study the requests and responses and, by means of TFPHTTPVClient, to build something.

In fact you don't really need the same server as you use to get emails for sending emails out, you can use any SMTP server you have access to. After all an email is just dropped into a mailbox with a target address and the system delivers it to that target.

I don't really know how you can get under the skin of the Exchenge Webmail app, though...

Bo Berglund Developer in Sweden

Reply by email