Prepare your development environment

If you intend to submit your messages via SOAP, follow these steps to verify that your environment is capable of sending web-to-postal messages through PostalMethods:

  1. From your server, verify that you can view a live page on the PostalMethods server at https://api.postalmethods.com/PostalMain.asmx (HTTPS, port 443) or at http://api.postalmethods.com/PostalMain.asmx (HTTP, port 80). If you can’t, check your internet connection, firewall settings, and proxy settings. We recommend using the HTTPS secure connection.
  2. Scroll down to your development environment for further instructions:
    • C# and VB.NET using Visual Studio 2008
    • PHP
    • ASP

Visual Studio (C# and VB.NET)

  1. Create a new project
  2. Select the “Console Application” template
  3. Create a Web Reference:
    Using the Solution Explorer, right-click on the project name (by default: “ConsoleApplication1”):

    • Select “Add Service Reference”
    • Click the “Advanced” button
    • Click the “Add Web Reference” button
    • In the URL line, enter https://api.postalmethods.com/PostalMain.asmx and hit the “Go” button
    • Once the Web Service is detected, click the “Add Reference” button

PHP

  1. Determine your version of PHP by running a file with the following contents on your server:
    <?php
    echo phpinfo();
    ?>

    The title of the resulting page will indicate the version number of your PHP installation, for example PHP version 5.2. Proceed if you have version 5 or higher.

  2. Verify your SOAP library – in the resulting page from step #3, search for the phrase –enable soap. If it’s present – you have the required SOAP library installed (it usually is). If not, you need to either recompile PHP with this option enabled, or use PostalMethods via HTTP POST or SMTP.

ASP

  1. You need to have Microsoft SOAP Toolkit Version installed. To verify that it is properly installed, add the following code to an ASP page:
    <%
    Dim X : Set X = Server.CreateObject("MSSOAP.SoapClient30")
    Response.Write "SOAP is available"
    %>
  2. To run your script Using IIS:
    1. Place your script in a folder (e.g. C:\PostalMethods\myscript.asp)
    2. Open IIS Manager. Under Local computer -> Web sites -> Default web site -> [Right click] new -> Virtual Directory. Alias: PostalMethods; Directory: C:\PostalMethods
    3. Open your browser and type: http://localhost/interfax/myscript.asp
  3. If you are sending letters from behind a proxy using Microsoft SOAP Toolkit Version 3.0, you can use one of the two following options:
    • Option 1 – Use automatic detection by:
      objSoap.ConnectorProperty("EnableAutoProxy") = True
    • Option 2 – Specify a proxy server:
      objSoap.ConnectorProperty("ProxyServer") = "192.168.0.100"
    • Optionally, if the proxy server is password-protected specify:
      objSoap.ConnectorProperty("ProxyUser") = "Proxy Username"
      objSoap.ConnectorProperty("ProxyPassword") = "Proxy Password"
Send Letters
Securely + Reliably
Send letters securely and reliably from any business application. Use for invoices, quotes, and other important business communications. Enjoy special web-form to postal features and instant notifications.
Simple Process
Easy as 1-2-3
Experience the ease of our streamlined process - developed for efficiency! You submit your document by email or API. We automatically print, collate, insert, and stamp your letter. Your letter is delivered via standard postal service.
Pay As You Go
No Fuss. No Obligations.
Register for free with no obligations! Evaluate the service as long as you need. Once you are ready, set up our user-friendly pay-as-you option to use our service. No fuss. No on-going commitment. Just plain easy!