Can you open outllok through php without being mailto?

1

I have a request system that sends automatic e-mail to the representatives with an attachment of a pdf file made in fpdf, but now the company requested that instead of sending automatic I would use outlook as an alternative to send, of receipt and confirmation and would keep a history in the outllok until the request is made, I speak outlook since all the users who use the system have it installed in the machines. I know that in C# asp.net this is possible, but in PHP I did not find anything related to the subject.

Or is there a library in php that could use similarly to webmail that could be called every time we complete an order?

I'm using this link to send it up to fill in the recipient's email and subject, but does not attach the automatically generated pdf.

<a href="mailto:[email protected]?subject=Envio de pedido&body=Por favor atentar aos ítens">Enviar</a>
    
asked by anonymous 13.10.2017 / 20:33

2 answers

4

Responding to the heart of your question, unfortunately PHP will not be able to do what it wants because as it runs on the server, it will not be able to do that exchange between the server and the client machine in the way it is proposing.

Meanwhile ...

I did a brief search on webmail libraries in PHP and found something that might be interesting to your system, which can be integrated with it: link

According to the documentation it is " free and open source ". Maybe it will be possible to integrate with your system, call it when the order is finished, and already enter all the shipping information, including the attachment (maybe a good developer is needed to do this).

If you get a solution in PHP (like a webmail), it would be interesting to leave a feedback so that we can know if it works to help others with the same demand.

    
13.10.2017 / 22:52
2

According to the Outlook CLI :

outlook.exe /c ipm.note /m [email protected]

Other commands / parameters are available.

So you could use:

exec('outlook.exe /c ipm.note /m [email protected]');

You may need to specify the path, then:

exec('"C:\Program Files (x86)\Microsoft Office\root\Office16\outlook.exe" /c ipm.note /m [email protected]');

Just be careful with the email you entered, because it could be a malicious text, in which it would be possible to execute a code defined by the attacker, after all you are inserting it into exec . If email is exec would open [email protected] & notepad.exe , for example.

Again, the client needs to be running PHP, which is certainly not applicable in most cases!

    
14.10.2017 / 05:07