Login to MS Exchange to send e-mail

Discussion in 'Perl Misc' started by Y W Wong, May 27, 2004.

  1. Y W Wong

    Y W Wong Guest

    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
     
    Y W Wong, May 27, 2004
    #1
    1. Advertising

  2. Y W Wong

    Petri Guest

    In article <c956nn$23eb$>, 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
     
    Petri, May 27, 2004
    #2
    1. Advertising

  3. Y W Wong

    Y W Wong Guest

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


    "Petri" <> ¦b¶l¥ó news:
    ¤¤¼¶¼g...
    > In article <c956nn$23eb$>, 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, May 28, 2004
    #3
  4. On 2004-05-28, Y W Wong <> wrote:

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

    >
    > 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!
     
    Grant Edwards, May 28, 2004
    #4
  5. Y W Wong

    Y W Wong Guest

    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" <> ¦b¶l¥ó
    news: ¤¤¼¶¼g...
    > On 2004-05-28, Y W Wong <> wrote:
    >
    > >>> 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.

    > >
    > > 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, May 29, 2004
    #5
  6. In article <c9adch$1sjv$>, Y W Wong wrote:

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

    >
    > 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!!
     
    Grant Edwards, May 29, 2004
    #6
  7. Y W Wong

    Joe Guest

    In message <40b8c454$0$17252$>, Grant
    Edwards <> writes
    >In article <c9adch$1sjv$>, 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.
    >

    The protocol is called MAPI. Search for this on the Net to get a feel
    for the ease of interfacing with it.
    --
    Joe
     
    Joe, May 29, 2004
    #7
  8. On 2004-05-29, Joe <> 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.

    >
    > 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!!
     
    Grant Edwards, May 29, 2004
    #8
  9. Y W Wong

    Petri Guest

    In article <c9adch$1sjv$>, 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.


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


    > 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
     
    Petri, May 29, 2004
    #9
  10. Y W Wong

    Y W Wong Guest

    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" <> ¦b¶l¥ó news: ¤¤
    ¼¶¼g...
    > In article <c9adch$1sjv$>, 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.

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

    >
    > > 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, May 30, 2004
    #10
  11. Y W Wong

    Ben Morrow Guest

    [DON'T top-post]

    Quoth "Y W Wong" <>:
    > "Petri" <> ¦b¶l¥ó news: ¤¤
    > ¼¶¼g...
    > > In article <c9adch$1sjv$>, 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.

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

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

    >
    > 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.
    The Levellers, 'Believers'
     
    Ben Morrow, May 30, 2004
    #11
  12. In article <c9d2bd$8be$>, Y W Wong wrote:

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

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

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


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

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


    > 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!!
     
    Grant Edwards, May 30, 2004
    #12
  13. Y W Wong

    Petri Guest

    In article <40ba33f8$0$17258$>, Grant Edwards
    says...
    >>> Use POP3 or IMAP to login to your exchange mailbox, just
    >>> like Outlook does.


    > 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, May 30, 2004
    #13
  14. Y W Wong

    Petri Guest

    In article <c9d2bd$8be$>, Y W Wong says...
    >> 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.


    > 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
     
    Petri, May 30, 2004
    #14
  15. On 2004-05-30, Petri <> wrote:
    > In article <40ba33f8$0$17258$>, Grant Edwards
    > says...
    >>>> Use POP3 or IMAP to login to your exchange mailbox, just
    >>>> like Outlook does.

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


    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!
     
    Grant Edwards, May 30, 2004
    #15
  16. Y W Wong

    Y W Wong Guest

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

    Thanks to all.

    Yan
     
    Y W Wong, May 31, 2004
    #16
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZmFoYWRvbWFu?=

    How to send an e-mail from asp .net using exchange server?

    =?Utf-8?B?ZmFoYWRvbWFu?=, Jul 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,062
    Landi
    Jul 26, 2005
  2. Bruce Hodge
    Replies:
    0
    Views:
    426
    Bruce Hodge
    Feb 15, 2006
  3. www.westerncartooncards.ca

    Exchange Links < Western Cartoon Cards > Exchange Links

    www.westerncartooncards.ca, Jul 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    1,254
    Toby Inkster
    Jul 12, 2004
  4. =?Utf-8?B?dG9t?=

    send mail via exchange server

    =?Utf-8?B?dG9t?=, Aug 31, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    440
    =?Utf-8?B?dG9t?=
    Aug 31, 2006
  5. martin smith
    Replies:
    3
    Views:
    337
    Jeff Cochran
    Mar 21, 2005
Loading...

Share This Page