Email + Outlook

Author Message
betto

  • Total Posts : 11
  • Scores: 0
  • Reward points : 0
  • Joined: 2/11/2011
  • Status: offline
Email + Outlook Tuesday, April 26, 2011 2:57 AM (permalink)
0
Hi to all:

I have this problem ...

When I work I use Microsoft Outlook 2003 always opened ..

From DOS I have created this command line that runs perfectly:

C:\>"c:\program files\microsoft office\office11\outlook.exe" /c ipm.note /m "mail@yahoo.com?subject=test" /a c:\my_path\file.pdf

When I execute it from command line,
from Outlook appears a new correct message window with the file attached ...

My purpose is to do the same thing in an automatic way, in a page called mail.asp:

<%@ Language=VBScript %>
<%
Option Explicit
Dim shell
'
Set shell = Server.CreateObject("WScript.Shell")
shell.run """c:\program files\microsoft Office\office11\outlook.exe"" /c ipm.note /m ...."
Set shell = Nothing
%>

<HTML>
<BODY>
<script>
alert("Record ok!");
</script>
</BODY>
</HTML>

When I open the page mail.asp, near the alert, I receive this error:

Impossible to start Microsoft Office Outlook. Application error. Close Outlook and Windows, then restart...

It' s very stange, any ideas to help me ??

P.S: even if I put the command above in a file.bat,
when I make double click on it works perfectly;
inside the page mail.asp even this file.bat returns me the same error ...
 
#1
    betto

    • Total Posts : 11
    • Scores: 0
    • Reward points : 0
    • Joined: 2/11/2011
    • Status: offline
    Re:Email + Outlook Thursday, April 28, 2011 3:01 AM (permalink)
    0

    I have solved the problem

    I have created a file, called outlook.bat:

    "c:\program files\microsoft office\office11\outlook.exe" /c ipm.note /m "mail_adress1?cc=mail_adress2&subject=Test&body=OK" /a \\server_path\test.pdf

    Then, the code inside server_page.asp is:


    <html>
    <head><title>test with mail and attached pdf</title></head>
    <body>
    <form method="POST" name="FrontPage_Form2">
    ....
    <input type="button" value="Mail + Pdf" onClick="window.location.href='outlook.bat';">
    .....
    </form>
    </body>
    </html>

    In this way every client can open the OWN Outlook message with an attached file that comes from the server
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9