Login to MS Exchange to send e-mail

Y

Y W Wong

Dear all,

Anyone know that how can I login to a MS Exchange server using my corporate
e-mail account to send a e-mail.
I use to do some automatic job and send the result to my colleagues in my
corporation.
I am using a RH9 Linux box and prefer to use Perl or shell script to do
that.

Many thanks,

YW
 
P

Petri

Anyone know that how can I login to a MS Exchange server using
my corporate e-mail account to send a e-mail.
I use to do some automatic job and send the result to my
colleagues in my corporation.
I am using a RH9 Linux box and prefer to use Perl or shell
script to do that.

Ask your exchange admin to start the SMTP-, and IMAP- or POP3-connectors on the
Exchange Server.
Then use the usual mail-modules available from CPAN.

If the connectors aren't already active, that is.
Have you checked if they are?


Petri
 
Y

Y W Wong

I just want to act as a simple script type MS Outlook to send text mail.
Anyone know how ?
 
G

Grant Edwards

I just want to act as a simple script type MS Outlook to send
text mail. Anyone know how ?

Yes. You've just been told how. What part of the answer
didn't you understand?
 
Y

Y W Wong

I understood the SMTP and POP3 description.
But it doesn't answer my question.
I am asking how to login like MS Outlook, not by POP3 or SMTP.
Hope that someone know what I am asking for.
 
G

Grant Edwards

I understood the SMTP and POP3 description. But it doesn't
answer my question. I am asking how to login like MS Outlook,
not by POP3 or SMTP.

You can't. Outlook uses a proprietary, undocumented protocol
to talk to Exchange server. The only way to send mail w/o
using SMTP is to run you application under Windows and use the
COM interface to Outlook and send mail using Outlook itself.

You said that what you want to do is use a simple script
interface to send text e-mails. That is about as far from
being "like Outlook" as you can get. :)
 
J

Joe

Grant said:
You can't. Outlook uses a proprietary, undocumented protocol
to talk to Exchange server. The only way to send mail w/o
using SMTP is to run you application under Windows and use the
COM interface to Outlook and send mail using Outlook itself.
The protocol is called MAPI. Search for this on the Net to get a feel
for the ease of interfacing with it.
 
P

Petri

I understood the SMTP and POP3 description.
But it doesn't answer my question.
I am asking how to login like MS Outlook, not by POP3 or SMTP.
Hope that someone know what I am asking for.

Do you know, yourself?
Use POP3 or IMAP to login to your exchange mailbox, just like Outlook does.
What's the problem?

Actually, you probably don't even have to login at all, since you claim you only
want to send email, and SMTP authentication is not on by default in Exchange
Server.
use Net::SMTP; # Or anyone of the numerous free email modules on CPAN.


Petri
 
Y

Y W Wong

How about POP3 cannot be enabled by some reason ?
I think we have to send to a smarthost by SMTP, is it ?
My requirement is not to using POP3 nor SMTP to send mail through MS
Exchange.
Hope u really understand what I am asking for.

Yan
 
B

Ben Morrow

[DON'T top-post]

Quoth "Y W Wong said:
How about POP3 cannot be enabled by some reason ?
I think we have to send to a smarthost by SMTP, is it ?
My requirement is not to using POP3 nor SMTP to send mail through MS
Exchange.
Hope u really understand what I am asking for.

You have already been given an answer to this: the only client that
knows how to talk the Exchange protocol is Outlook, so you have to be
using Win32 and then use Win32::OLE to make Outlook do what you want.

If you just want to send mail you can send it straight to your ISP's
smtp server (which will be a smarthost) using any of the email-sending
modules on CPAN.

Ben
 
G

Grant Edwards

Actually, Outlook doesn't use POP3 or IMAP. Outlook _Express_
does, but that's a completely different app.
How about POP3 cannot be enabled by some reason ?

QUIT TOP POSTING!

POP3 has NOTHING to do with sending e-mail.
I think we have to send to a smarthost by SMTP, is it ?

That question doesn't make sense.
My requirement is not to using POP3 nor SMTP to send mail
through MS Exchange.

You CAN'T do that without using Outlook. Period. What part of
that don't you undestand?
Hope u really understand what I am asking for.

Yes. We understand what you're asking for. That doesn't
change the answer:

YOU CAN NOT SEND EMAIL THE SAME WAY OUTLOOK DOES.

YOU *MUST* USE SMTP.

I'm now done telling you that.
 
P

Petri

Actually, Outlook doesn't use POP3 or IMAP. Outlook
_Express_ does, but that's a completely different app.

No, I'm actually referring to Outlook, which has an Internet E-mail connector
built in.
But yes, commonly you would connect via the MAPI/X.400 connector against your
Exchange mailbox, to get calendar-sharing and all the other stuff working too.
Nothing says you HAVE to use X.400 to send email, though, because you simply
don't. :)


Petri
 
P

Petri

How about POP3 cannot be enabled by some reason ?

And what would that reason be?
If you can connect with a noisy interface such as MAPI, you very well should be
able to connect with a simple text protocol such as SMTP and POP3.
If there is a policy behind your refusal to use SMTP and POP3, then the policy
needs changing, because your project is stalled until it changes.
I think we have to send to a smarthost by SMTP, is it ?

Why would you?
Once again; Tell your Exchange admin to start the SMTP connector on your
Exchange server.
You will immediately be able to send email through SMTP on your Exchange server,
just as if you would be using Outlook.

If you want to recieve email, than also tell him to start the POP3-connector.
You will immediately be able to login to your mailbox using POP3, and see all
the email in your mailbox, just as Outlook sees it.
My requirement is not to using POP3 nor SMTP to send mail through
MS Exchange.

Then good luck to you.
You can either reverse engineer MAPI, or use Outlooks COM-interface through
VBScript or Win32::OLE, or do nasty things to Outlook with the SendKeys()
function.
Seems you can even do that latter in Perl:
http://search.cpan.org/search?query=sendkeys&mode=all
Hope u really understand what I am asking for.

You need to explain more thoroughly what it is you want to accomplish, and why
you can't use the obvious solution.


Petri
 
G

Grant Edwards

No, I'm actually referring to Outlook, which has an Internet
E-mail connector built in. But yes, commonly you would connect
via the MAPI/X.400 connector against your Exchange mailbox, to
get calendar-sharing and all the other stuff working too.
Nothing says you HAVE to use X.400 to send email, though,
because you simply don't. :)

You're right. I oversimplified things.
 
Y

Y W Wong

I am now understood that it is very difficult to do that without using SMTP
& POP3.

Thanks to all.

Yan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top