peter, you're absolutly right.

It should be something like

http.send myMsg.GetRawMessage

The GetRawMessage() should be the obvious API method for any decent mail application.

I'm yet to find it inside Outlook.

ntozier,

Please check the following:

1. The osTicket API requires a special server configuration. This way the server will serve the /api/http.php/tickets.xml request, wich normally should give a 404 response. The /api/.htaccess file contains the Apache rules for this to work. This will be ignored inside an IIS configuration. Please check http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig(http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig).

2. Any compiler error in my script. You should add a reference to Microsoft XML v6.0.

3. Any problem to establish a port 80 connection to the osTicket host from Outlook. This smells like a worm, so check for firewall or AV activity, or any proxy definition that's on the way.

4. The first version didn't work if the sender was from within an Exchange environment. This should trigger an osTicket exception, though, and still see activity in your IIS.

5. The Outlook 2010 Macro activation may be unclear, I don't know much more either. Macros would still be disabled even if you checked them on. Open the VBA editor and just press the "Run" button. If macros are disabled, you should see an error box.

peter, you're absolutly right.

It should be something like

http.send myMsg.GetRawMessage

The GetRawMessage() should be the obvious API method for any decent mail application.

I'm yet to find it inside Outlook.

Let us know if you figure it out - working on the same thing for Gmail/Google Apps.

I am using Apache (not iis) and I am seeing much the same thing as mentioned above.

- no errors to speak of

- just no ticket sent over

I wanted to add what a great mod/ concept!

24 days later

I'm not sure what I'm doing wrong, and can't get it to work.

but this are the steps I did. (Outlook 2013)

1. Create API in OSticket with Mail Server (exchange) Outgoing IP.

2. Modify the top lines of script

'Change these to suit your environment

Const API_KEY = "Copy of API here"

Const HOST_NAME = "https://help.intentinallygone.com"

Const MAX_ATTACHMENT = 2097152

3. Go to Outlook 2013

4. press ALT+F11

5. Double Click 'ThisOutlookSession' and paste the code

6. Save

7. Make sure that Macros can run in the Trust Center

8. Add the button to the Ribbon at the top

Now when I click an email nothing happens...

@[deleted],

I never got it working either.

10 days later
2 months later

Additional information

Cudos to estrelow for doing the heavy work in this mod, but I had some issues with getting this working so I wanted to give some clarifications on how to get it up and going.

I'm using Windows 2008R2 / php / mySQL

In IIS you must add the URL Rewrite: I followed (http://www.iis.net/learn/extensions/url-rewrite-module/importing-apache-modrewrite-rules) instructions.

Restart the webserver

Add a API Key from the osTicket Admin Panel website "Manage - Add API Keys"

In Outlook open VB for Applications (ALT+F11)

In a project - insert a new module and specify the (Name) osTicketConnector

Then paste the modified code estrelow provided, and update Const API_KEY and HOST_NAME

REMOVE the topline "Attribute VB_Name = "osTicketConnector" from the script

Click on "Tools - References" and check "Microsoft XML, v6.0"

Save and close VB

Either in your inbox or in an open email right click to customize the ribbon bar, select Macros from Choose commands and select Project.Post2osTicket and add it to a custom group

That worked for me!

Thanks...This works great now.

I'll see if I can turn it into a batch script to set it up. Do you know how to setup the API without having an IP restriction?

Hi, I'm using Outlook 2007 so with Module in first post I cant get email address from Exchange user. is there any alternative solution?

Api Key IP address

I was able to get this working based on hanspnilsson instructions. Can an API key be generated for a range of addresses or for any address?

5 days later

Choosing Department

Is there away that the department that the ticket gets routed to can be changed? Maybe this can be something that is input by the support engineer? How is this handled currently?

Attachment issue

I am able to use this as it sits, until i try to add an attachment. it says:

Run time error '-21470254891 (80070005)':

Cannot save the attachment. You don't have appropriate permission to perform this operation.

if I then choose the debug it got to:

'I only add attachments up to a limit in size

If oFile.Size

sTmpFile = fs.GetTempName

oFile.SaveAsFile sTmpFile

and highlights:

oFile.SaveAsFile sTmpFile

Windows 2008 server IIS box

Correction- it only worked once

I tried other emails and they all failed to be added. No errors. Just nothing happened after the first successful submission.

I am still unable to get this to work.

Using hanspnilsson's instructions on a Windows 2008 server with Apache 2.2 & Outlook 2007, nothing happens. No errors, no tickets, nothing.

I got this to work on two machines, but the big problem is that there isn't a way to have the IP restriction disabled.

It makes it useless for us if we are out of the office and want to send tickets in.

The next step would be to just blank forward an email to the helpdesk. Maybe do a seperate email account with filter.

7 days later

I am still unable to get this to work.

Using hanspnilsson's instructions on a Windows 2008 server with Apache 2.2 & Outlook 2007, nothing happens. No errors, no tickets, nothing.

I was able to get it to work on my second try. Send me a PM and let me know what you are doing. the steps you took on the server and on Outlook. I just set it up on Outlook 2010

A mod of this mod

So I finally got this working and it's great.

I use two different hosting installs, one for a specific client and on for everyone else. I thought I could add two modules to the VB project, but the outlook VB app doesn't like that. One, if not both fail. So I was wondering if anyone could create a form that had two buttons. Where one button sets the API_KEY and HOST_NAME to the value of my first host, and the second button sets it to the second host.

I also think a button choice (or drop down) would also work for different locations with different IP address. So no matter where I am sitting with my laptop I can choose the correct API key associated to the IP address of a location.

Thanks in advance for any help.

Write a Reply...