Hi,
is there a way, maybe with headers to open my outlook mail window (just like if I would we using mailto) with php?

    I don´t mean to send mail with mail()... i mean if there is another way to open the mail client programm on the client pc with a preformatted mail, not using mailto:xxx@xxx.cl?subject=support&body=aaaabbbbbbccccc

    I need that when on of my users press on send, his local mail programms should open and show him a preformatted mail, so that he can review it and then send it.

    Is that possible without using mailto:?

      i can only assume that you are asking this because you do not want bots/spiders to get your email address. there are several ways to try and fool bots. look here for some ideas. many modern bots are aware of these tricks. the most foolproof way is to do as dougal85 suggested and design your own frontend form and use the [man]mail[/man] function.

        Actually,
        i have my script runing on an intranet... and for some reason, my server can not send out mails. So I need that the mails are send out from the client side. The mails that are send out are reports, that exceed the max lenght alowed by mailto... so I was wondering if there is a way to generate the mail over php and send it to the outlook client of my user... so that he can send it.

          I´m trying to use PHP to create new Outlook email message, add some recipients, subject, and message in body.

          Is this posible?

            It isnt possible with php IMHO. You can only open the default mailprogram using mailto:. Whats wrong with that? 🙂

            If you want to hide that mailto: line in statusbar, you can use javascript and hidden iframe to do that. Heres simplified example:

            <a href="#" onclick="window.open('mailto:someone@somewhere.com?subject=Some subject','null'); return false;">Send mail</a>
            <iframe name="null" style="display:none;"></iframe>
            

            Im not javascript guru so you could maybe do that without iframe thingie..

              The problem with mailto is that there is a limit to how many caracter you can send... so if you want to format a mail with a long body... it will not work with mailto

              But it seems that you are right that there is no way to do this with PHP.

              There is a way to open outlook with a formatted mail, but it opens on the server and not on the client 🙁

              $objApp = new COM("Outlook.Application");
              
              #Get the application name and version
              print "Application name: {$objApp->Application->name}<br />" ;
              print "Loaded version: {$objApp->Application->version}<br />";
              
              $myItem = $objApp->CreateItem("0");
              $a=$myItem->Recipients->Add("paul.rogers@mowlem.com");
              $myItem->Subject="Test the PHP/COM with Outlook";
              $myItem->Body="This is a Body Section now.....!";
              $myItem->Display();
              

              :glare:

                Write a Reply...