For Programmers: Free Programming Magazines  


Home > Archive > AWK > May 2004 > Login to MS Exchange to send e-mail









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Login to MS Exchange to send e-mail
Y W Wong

2004-05-27, 1:31 pm

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


Petri

2004-05-27, 2:31 pm

In article <c956nn$23eb$1@news.hgc.com.hk>, Y W Wong says...
> 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 W Wong

2004-05-28, 10:31 am

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


"Petri" <Petri_member@newsguy.com> 在郵件 news:c957mf01dkd@drn.newsguy.com
中撰寫...
> In article <c956nn$23eb$1@news.hgc.com.hk>, Y W Wong says...
>
> 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
>



Grant Edwards

2004-05-28, 11:31 am

On 2004-05-28, Y W Wong <ywwong_hk@hotmail.com> wrote:

>
> 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?

--
Grant Edwards grante Yow! Hey, waiter! I want
at a NEW SHIRT and a PONY TAIL
visi.com with lemon sauce!
Y W Wong

2004-05-29, 1:31 pm

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.


"Grant Edwards" <grante@visi.com> 在郵件
news:slrncbeip2.fsp.grante@grante.rivatek.com 中撰寫...
> On 2004-05-28, Y W Wong <ywwong_hk@hotmail.com> wrote:
>
>
> Yes. You've just been told how. What part of the answer
> didn't you understand?
>
> --
> Grant Edwards grante Yow! Hey, waiter! I

want
> at a NEW SHIRT and a PONY

TAIL
> visi.com with lemon sauce!



Grant Edwards

2004-05-29, 2:30 pm

In article <c9adch$1sjv$1@news.hgc.com.hk>, Y W Wong wrote:

>
> 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. :)

--
Grant Edwards grante Yow! HOORAY, Ronald!! Now
at YOU can marry LINDA
visi.com RONSTADT too!!
Joe

2004-05-29, 2:30 pm

In message <40b8c454$0$17252$a1866201@newsreader.visi.com>, Grant
Edwards <grante@visi.com> writes
>In article <c9adch$1sjv$1@news.hgc.com.hk>, Y W Wong wrote:
>
>
>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.
--
Joe
Grant Edwards

2004-05-29, 3:30 pm

On 2004-05-29, Joe <joe@jretrading.com> wrote:

>
> The protocol is called MAPI. Search for this on the Net to get a feel
> for the ease of interfacing with it.


MAPI (Messaging Application Program Interface) is the library
API rather than the protocol:

http://www.outlookcode.com/d/mapi.htm

--
Grant Edwards grante Yow! It don't mean a
at THING if you ain't got
visi.com that SWING!!
Jeff Breitner

2004-05-29, 6:30 pm

Y W Wong wrote:
> 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.
>



You can log in for mail retrieval using IMAP (provided it is enabled).
You will not see any of your contact or calendaring data however since
this isn't MAPI.

I do not know of any compatible MAPI clients.


--

WWJD? JWRTFM
Rot13 for email address: yvfgf @ ehqa.pbz
Petri

2004-05-29, 7:30 pm

In article <c9adch$1sjv$1@news.hgc.com.hk>, Y W Wong says...
[color=darkred]
[color=darkred]
[color=darkred]
> 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 W Wong

2004-05-30, 1:31 pm

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

"Petri" <Petri_member@newsguy.com> 在郵件 news:c9b1pt0rav@drn.newsguy.com 中
撰寫...
> In article <c9adch$1sjv$1@news.hgc.com.hk>, Y W Wong says...
>
>
>
>
> 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
>



Ben Morrow

2004-05-30, 3:30 pm

[DON'T top-post]

Quoth "Y W Wong" <ywwong_hk@hotmail.com>:
> "Petri" <Petri_member@newsguy.com> 在郵件 news:c9b1pt0rav@drn.newsguy.com 中
> 撰寫...
> does.
> you only
> Exchange
>
> 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

--
If you put all the prophets, | You'd have so much more reason
Mystics and saints | Than ever was born
In one room together, | Out of all of the conflicts of time.
ben@morrow.me.uk The Levellers, 'Believers'
Grant Edwards

2004-05-30, 4:31 pm

In article <c9d2bd$8be$1@news.hgc.com.hk>, Y W Wong wrote:


Actually, Outlook doesn't use POP3 or IMAP. Outlook _Express_
does, but that's a completely different app.
[color=darkred]
[color=darkred]
> 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.

--
Grant Edwards grante Yow! I need to discuss
at BUY-BACK PROVISIONS
visi.com with at least six studio
SLEAZEBALLS!!
Petri

2004-05-30, 5:30 pm

In article <40ba33f8$0$17258$a1866201@newsreader.visi.com>, Grant Edwards
says...
[color=darkred]
> 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

Petri

2004-05-30, 6:30 pm

In article <c9d2bd$8be$1@news.hgc.com.hk>, Y W Wong says...
[color=darkred]
[color=darkred]
> 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

Grant Edwards

2004-05-30, 6:30 pm

On 2004-05-30, Petri <Petri_member@newsguy.com> wrote:
> In article <40ba33f8$0$17258$a1866201@newsreader.visi.com>, Grant Edwards
> says...
>
>
> 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.

--
Grant Edwards grante Yow! Yow! I'm having a
at quadraphonic sensation
visi.com of two winos alone in a
steel mill!
Jeff Breitner

2004-05-30, 6:30 pm

Grant Edwards wrote:

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



If you set it up to talk MAPI to an Exchange Server, then no. But
Outlook talks POP3 and IMAP just fine and if told to use that with an
Exchange Server, it'll gleefully do it. Why you'd want to do that
though, is another question.



--

WWJD? JWRTFM
Rot13 for email address: yvfgf @ ehqa.pbz
Y W Wong

2004-05-31, 12:31 pm

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

Thanks to all.

Yan


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com