Strongmail API PHP Sample Code

Strongmail is a mail delivery company that we began using about a month ago. They’ve got an amazing delivery platform and are a very world class company, except when it comes to their API. With a lot of the stuff that we do, we needed to have a mail auto-responder, and unfortunatly that’s one feature that Strongmail doesn’t provide. The solution is to code the auto-responder yourself and then use the Strongmail API to send the emails on a transactional basis.

I wondered “how hard can it be?” I’ve worked with Authorize.net’s API, Twitter’s API, Facebook’s API, Paypal’s API, you name it. When it comes to working with an API, it’s not that challenging for me… Until Strongmail came along. They sent me the documentation, and I was immediatly lost. The API is a SOAP based API (not that untypical), but their documenation is horrible, so I asked if they had any sample code to implement it with PHP (not that untypical). They provided me with some sample code and it immediatly game me errors.

Turns out it was meant to run on a PHP server that doesn’t have SOAP compiled in with it… well, that’s a problem I tell them. I try to get their help on the errors I’m getting, and with such little documentation on how the API works, and what options are needed for each call it’s pretty much like throwing a rock at a bucket in the dark from 50 yards away and trying to hit it. I was in desperate need of help. I finally got one of their professional service members to take me seriously and start providing some actual help, but even then it seemed futile.

Last night I finally cracked it. Everything began working! I ran into a couple of small errors, but they were easily solved and it began working! After two long weeks of sending code back and forth, reporting error codes, deciphering documentation I finally figured it out on my own. They bill us thousands of dollars a month for their service, and I had to show THEM how their own API works.

If anyone out there finds themself in the same situation, I’m providing you with the sample code that I rewrote for them. I asked them to make it available in their support site, but I don’t know if they will or not. I really hope this sample code can help someone out there that’s trying to do the same thing.

SAMPLE CODE

Changing Front Door Speakers in 2005 Toyota Corolla S

I got a couple of speakers from a friend on mine to put into my Corolla. It’s a 2005 S model, and this is only my second time replacing speakers in a car. I tried to look up some info online about how to do it, but there wasn’t a whole lot of info and there certainly weren’t any pictures to go along with it. I will show you how I replaced the stock speakers and if you have any questions at all, just post them in the comments.

Tools

Tools

Tools:

  • flat head screwdriver
  • philips screwdriver
  • wire strippers
  • wire cutters
  • cordless drill
  • 1/8″ drillbit
Remove arm rest

Remove arm rest

The arm rest comes off fairly easy just using your hands.

Remove electronic panel

Remove electronic panel

Removing the electronic panel was a little tricky. Use the flathead screwdriver to pry up the top (closest to door hinge) side first, then slide it forward as you pull it out.

Hidden screw behind door handle

Hidden screw behind door handle

Remove this hidden screw and the two screws under the arm rest.

Door is removed

Door is removed

Pull off the tweeter cover to make removing the door panel easier. I just started at the top of the door and worked my way down, there are little plastic snaps that hold it on and the whole door came off really easy.

Close up of stock speaker

Close up of stock speaker

They decided to use rivets to hold on the stock speaker, so I got out my drill and drillbit. Drill in the center of the rivets about a quarter of an inch. Using your flat head screwdriver you can now pry off the flat part of the rivet that you can see. Now you have to wedge the screwdriver into the sides of the speaker mount to pry it off the door. It will give you a little trouble, and don’t worry too much about the rivets deforming the holes.

Holes drilled for new speaker mount

Holes drilled for new speaker mount

With the stock speaker removed, I had to drill two new holes for the new speaker mounting. I still just used the 1/8″ drillbit.

White to Pink, Black to Purple

White to Pink, Black to Purple

I’m not an expert on wiring… but I do know you should never cross wires. Unfortunatly Toyota does not label which wire is ground. My reasoning was to pair up the lightest colors and the darkest colors. The speaker still works and sounds good, so I hope that’s how it’s done. Good luck with that. I had to manually wire it because the car harness was different than the speaker harness.

Finished installing new speaker

Finished installing new speaker

Wrap the wires in electrical tape and I’m done! I had to mount the speaker upside down to give me a little more room for the wiring. Now you just have to snap the door back on and screw in the three screws!

If you have any questions at all, I’ll try to answer them. I’m by no means an expert, but hopefully this will help you out a little.