Pascal units to connect to an Exchange server

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Pascal units to connect to an Exchange server

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,
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal units to connect to an Exchange server

Bo Berglund
On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza
<[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal units to connect to an Exchange server

Free Pascal - General mailing list
Bo Berglund <[hidden email]> schrieb am Do., 19. Juli 2018, 21:52:
On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza
<[hidden email]> 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 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal units to connect to an Exchange server

Free Pascal - General mailing list
In reply to this post by Luciano de Souza
luciano de souza <[hidden email]> schrieb am Do., 19. Juli 2018, 20:29:
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 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal units to connect to an Exchange server

Luciano de Souza
In reply to this post by Bo Berglund
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 <[hidden email]>:

> On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza
> <[hidden email]> 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  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


--
Luciano de Souza
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Pascal units to connect to an Exchange server

Bo Berglund
On Fri, 20 Jul 2018 07:43:43 -0300, luciano de souza
<[hidden email]> wrote:

>
>2018-07-19 16:51 GMT-03:00, Bo Berglund <[hidden email]>:
>> On Thu, 19 Jul 2018 15:29:12 -0300, luciano de souza
>> <[hidden email]> 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.

>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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal