469,643 Members | 2,061 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Scrip for sending an eMail via PHP and Outlook

Hello all,

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?

Thanks in advance,

Sven
Jul 17 '05 #1
15 3928
Sven Templin wrote:
Hello all,

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


It begs the question.... where exactly is Outlook sending mail to?
Surely it must be configured to send to a known SMTP server, or does the
Outlook/Exchange combination use some other proprietary mail protocol?

Jul 17 '05 #2
Sven Templin wrote:
Hello all,

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?

Thanks in advance,

Sven


install Mandrake on the box.

make sure you have
the postfix, php , php-cli, apache packages installed.

problem solved.

Jul 17 '05 #3
>>
We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?

install Mandrake on the box.

make sure you have
the postfix, php , php-cli, apache packages installed.

problem solved.


I could go one better than that. If you visit
http://www.f-secure.com/virus-info/ you get a huge list of scripts to
send e-mail using Outlook ;-) Better still you don't even have to use
your own box ;->
Jul 17 '05 #4
Kevin Thorpe wrote:

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?

install Mandrake on the box.

make sure you have
the postfix, php , php-cli, apache packages installed.

problem solved.


I could go one better than that. If you visit
http://www.f-secure.com/virus-info/ you get a huge list of scripts to
send e-mail using Outlook ;-) Better still you don't even have to use
your own box ;->


ha ha! .... good post!

;-)

Jul 17 '05 #5
Hello,

On 07/28/2004 10:23 AM, Sven Templin wrote:
our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


Under Windows without a SMTP server, only by sending messages directly
to the recipient SMTP server. In that case you may want to try this
class that can compose and send messages via SMTP and supports direct
delivery.

http://www.phpclasses.org/mimemessage

You also need these:

http://www.phpclasses.org/smtpclass

http://www.phpclasses.org/phpresolver

There is a simpler and much faster and safe way that I am testing but
you need to have IIS mail server or Exchange on Windows 2000 or better.
If you or anybody is interested in participating in the tests, just mail
me privately.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #6
Hello,

On 07/28/2004 10:23 AM, Sven Templin wrote:
our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


Under Windows without a SMTP server, only by sending messages directly
to the recipient SMTP server. In that case you may want to try this
class that can compose and send messages via SMTP and supports direct
delivery.

http://www.phpclasses.org/mimemessage

You also need these:

http://www.phpclasses.org/smtpclass

http://www.phpclasses.org/phpresolver

There is a simpler and much faster and safe way that I am testing but
you need to have IIS mail server or Exchange on Windows 2000 or better.
If you or anybody is interested in participating in the tests, just mail
me privately.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #7

"Kevin Thorpe" <ke***@pricetrak.com> wrote in message
news:41***********************@news.easynet.co.uk. ..
Sven Templin wrote:
Hello all,

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


It begs the question.... where exactly is Outlook sending mail to?
Surely it must be configured to send to a known SMTP server, or does the
Outlook/Exchange combination use some other proprietary mail protocol?


Indeed. Outlook does far than e-mail after all. Don't know what it uses
exactly. DCOM I suspect. Exchange can be configured to act as an SMTP server
however.

To send a email via the Outlook client with the help of Office Automation
(i.e. COM). Not going to be pretty though.
Jul 17 '05 #8
sv**********@gmx.net (Sven Templin) wrote in message
news:<12**************************@posting.google. com>...

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


Yes, but there's no need (and, honestly, no way) to use the Outlook
client for that. As long as there is an external SMTP server available,
you can send mail through it using phpMailer or another similar script.

phpMailer is available at http://phpmailer.sf.net/

Cheers,
NC
Jul 17 '05 #9
clippy the paperclip <bi********@microsoft.com> wrote in message news:<41***********************@news.easynet.co.uk >...
Kevin Thorpe wrote:

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?

install Mandrake on the box.

make sure you have
the postfix, php , php-cli, apache packages installed.

problem solved.


I could go one better than that. If you visit
http://www.f-secure.com/virus-info/ you get a huge list of scripts to
send e-mail using Outlook ;-) Better still you don't even have to use
your own box ;->


ha ha! .... good post!

;-)


Thanks for your strong support! Yes, normally we are using SuSE Linux
or Slackware with all the stuff (sendmail...), but now we are in a
very restricted environment inside the intranet of an big automotive
manufacturer. And we have to use above named software. The exchange
server, running somewere in the intranet, does not listen on smtp
port, therefore I have to use the installed outlook client to forward
eMails. It is also impossible to install my own pop3 mailserver,
because all eMail clients have to be configured for the new pop3
server.

Bye, Sven
Jul 17 '05 #10
Manuel Lemos <ml****@acm.org> wrote in message news:<41**********@acm.org>...
Hello,

On 07/28/2004 10:23 AM, Sven Templin wrote:
our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


Under Windows without a SMTP server, only by sending messages directly
to the recipient SMTP server. In that case you may want to try this
class that can compose and send messages via SMTP and supports direct
delivery.

http://www.phpclasses.org/mimemessage

You also need these:

http://www.phpclasses.org/smtpclass

http://www.phpclasses.org/phpresolver

There is a simpler and much faster and safe way that I am testing but
you need to have IIS mail server or Exchange on Windows 2000 or better.
If you or anybody is interested in participating in the tests, just mail
me privately.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html


Hello Manuel,

thanks for your posting. But above mentioned, the exchange server
inside the intranet does not listen on the smtp port. It is also
impossible to reach the smtp server outside the intranet. I am not
familiar with VBScript, because we are normally using Linux. We are
looking for a php script which starts an VBScript, which can use an
outlook client to forward eMails via M$ proprietary protocol. I would
not like to make an "M$ certified exchange server training" to solve
this problem... ;-)) And I do not know what tools I need to run
VBScript.

Thanks oncemore and bye,

Sven
Jul 17 '05 #11
Manuel Lemos <ml****@acm.org> wrote in message news:<41**********@acm.org>...
Hello,

On 07/28/2004 10:23 AM, Sven Templin wrote:
our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?


Under Windows without a SMTP server, only by sending messages directly
to the recipient SMTP server. In that case you may want to try this
class that can compose and send messages via SMTP and supports direct
delivery.

http://www.phpclasses.org/mimemessage

You also need these:

http://www.phpclasses.org/smtpclass

http://www.phpclasses.org/phpresolver

There is a simpler and much faster and safe way that I am testing but
you need to have IIS mail server or Exchange on Windows 2000 or better.
If you or anybody is interested in participating in the tests, just mail
me privately.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html


Hello Manuel,

thanks for your posting. But above mentioned, the exchange server
inside the intranet does not listen on the smtp port. It is also
impossible to reach the smtp server outside the intranet. I am not
familiar with VBScript, because we are normally using Linux. We are
looking for a php script which starts an VBScript, which can use an
outlook client to forward eMails via M$ proprietary protocol. I would
not like to make an "M$ certified exchange server training" to solve
this problem... ;-)) And I do not know what tools I need to run
VBScript.

Thanks oncemore and bye,

Sven
Jul 17 '05 #12
sv**********@gmx.net (Sven Templin) wrote in message
news:<12**************************@posting.google. com>...

the exchange server inside the intranet does not listen
on the smtp port. It is also impossible to reach the smtp
server outside the intranet.
Then you need an Exchange client. I used to doubt if it was
possible to create one on a non-Microsoft platform, but Ximian
seems to have pulled it off with Evolution. An alternative is
to look for an ASP script on MSDN or simply tweak Outlook for
the Web.
I would not like to make an "M$ certified exchange server
training" to solve this problem... ;-))
You'll pretty much have to. In order to use a protocol (any
protocol), you must understand how it works... You wouldn't
want to attempt writing a Webmail application unless you were
sufficiently familiar with POP/IMAP and SMTP, would you?
And I do not know what tools I need to run VBScript.


IIS will do.

Antway, it seems to me that you have two choices:

1. Develop a limited-functionality Exchange client in PHP
from scratch, or
2. Create a limited-functionality Exchange client using
MS-supplied ASP code.

In each case, you will have to understand how Exchange works,
but the first case will require much more profound understanding.

Cheers,
NC
Jul 17 '05 #13

Thanks for your strong support! Yes, normally we are using SuSE Linux
or Slackware with all the stuff (sendmail...), but now we are in a
very restricted environment inside the intranet of an big automotive
manufacturer.
if they dont allow you to use the tools to do your job , then whats the
point?

that's like being a car mechanic, but the garage is "restricted" so you cant
use a spanner.
And we have to use above named software. The exchange
server, running somewere in the intranet, does not listen on smtp
port, therefore I have to use the installed outlook client to forward
eMails. It is also impossible to install my own pop3 mailserver,
because all eMail clients have to be configured for the new pop3
server.

Bye, Sven


try using socket connections to talk to the exchange server directly.


Jul 17 '05 #14
On 07/29/2004 03:09 AM, Sven Templin wrote:
our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?
Under Windows without a SMTP server, only by sending messages directly
to the recipient SMTP server. In that case you may want to try this
class that can compose and send messages via SMTP and supports direct
delivery.

http://www.phpclasses.org/mimemessage

You also need these:

http://www.phpclasses.org/smtpclass

http://www.phpclasses.org/phpresolver

There is a simpler and much faster and safe way that I am testing but
you need to have IIS mail server or Exchange on Windows 2000 or better.
If you or anybody is interested in participating in the tests, just mail
me privately.

thanks for your posting. But above mentioned, the exchange server
inside the intranet does not listen on the smtp port. It is also
impossible to reach the smtp server outside the intranet. I am not
familiar with VBScript, because we are normally using Linux. We are
looking for a php script which starts an VBScript, which can use an
outlook client to forward eMails via M$ proprietary protocol. I would
not like to make an "M$ certified exchange server training" to solve
this problem... ;-)) And I do not know what tools I need to run
VBScript.


Sven, bear with me. You do not need a SMTP server to send messages. The
SMTP server is only needed to receive or relay messages.

The solution that my class implements does not require an SMTP server to
relay messages. I just sends the message directly to the recipient SMTP
server. This way it get away without the middle man SMTP server that you
said is not available. As long as your machine has direct access to the
Internet this works.

The other solution that I know would only work if you have access to the
file system of the machine where Exchange server is running. It needs to
be able to write message files to some mail drop directories. This
solution works but needs more testing. If you are interested, just mail
me privately so I can provide you a test version of the class above that
supports Exchange mail drops.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #15

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:-e********************@comcast.com...

"Kevin Thorpe" <ke***@pricetrak.com> wrote in message
news:41***********************@news.easynet.co.uk. ..
Sven Templin wrote:
Hello all,

our configuration is as following described:

- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000

_and_ no SMTP server available in the whole intranet.

We are looking for a php script for sending eMail with help of the
above named outlook client. Can somebody help?
It begs the question.... where exactly is Outlook sending mail to?
Surely it must be configured to send to a known SMTP server, or does the
Outlook/Exchange combination use some other proprietary mail protocol?


Indeed. Outlook does far than e-mail after all. Don't know what it uses
exactly. DCOM I suspect. Exchange can be configured to act as an SMTP

server however.

To send a email via the Outlook client with the help of Office Automation
(i.e. COM). Not going to be pretty though.


Easy enough to do, here is the Perl equvilent:-
#!c:\\perl\\bin\\perl

use strict;

use Win32::OLE;

use Win32::OLE::Const 'Microsoft Outlook';

my $Outlook = Win32::OLE->new('Outlook.Application', '');

my $ol = Win32::OLE::Const->Load($Outlook);

my $namespace = $Outlook->GetNamespace("MAPI");

my $mailitem = $Outlook->CreateItem(olMailItem);

my $reciptient = $mailitem->Recipients->Add("invalid\@example.com");

my $attachments = $mailitem->{"attachments"};

my $attachment = $attachments->Add("c:\\perl\\progs\\outlook.pl");

$mailitem->{"subject"} = "Test Perl OLE";

$mailitem->{"body"} = "You are clever - now with attachments";

$mailitem->send();
Jul 17 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by joe215 | last post: by
1 post views Thread by Devonish | last post: by
17 posts views Thread by Bonj | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.