Thierry Posted May 1, 2007 Share Posted May 1, 2007 I got a problem with sending mail via Outlook. I'm using a COM application (new COM("Outlook.Application")) to start up Outlook and then create a new email message. The problem is, if I try to include the address to which the mail will be send, Outlook gives the well-known security warning about another program trying to access the recipient list. Currently the line of code that includes the address is: $a=$myItem->Recipients->Add("[email protected]") Without that line, no warning is given and the subject and body appear fine, but no address. I don't need the address to be added to Outlook's list, I just need it to appear so it can be send. Any ideas? Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/ Share on other sites More sharing options...
ToonMariner Posted May 1, 2007 Share Posted May 1, 2007 why are you using a com app? surely a simple mailto link in a page will suffice - that way the user will be presented with their own email client - and it woudl not fall down if outlook is not on the users machine... Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/#findComment-242196 Share on other sites More sharing options...
Thierry Posted May 1, 2007 Author Share Posted May 1, 2007 The mailto has limitations in how much characters you can place in the body tag so I cant use it. Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/#findComment-242209 Share on other sites More sharing options...
ToonMariner Posted May 1, 2007 Share Posted May 1, 2007 so waht happens when they don't have outlook? why not just use phpMailer and then you will have total control over the email being sent? Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/#findComment-242211 Share on other sites More sharing options...
Thierry Posted May 1, 2007 Author Share Posted May 1, 2007 Nah its only for internal use in a network so that's not a problem. Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/#findComment-242225 Share on other sites More sharing options...
trq Posted May 1, 2007 Share Posted May 1, 2007 Nah its only for internal use in a network so that's not a problem. Thats not your problem. The COM object your using accesses services on the server, not the client. You cannot access COM on the client from PHP. Link to comment https://forums.phpfreaks.com/topic/49425-creating-a-new-mail-in-outlook/#findComment-242330 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.