JangoMail Setup


Alright, I just had a good bout with the Jangomail API.  Seemed easy enough, but I wanted to share my results with everyone. I am going to share a simply command to send a basic transaction email, in HTML, with an
attachment.

First off, create yourself an account at Jangomail.  Secondly, make note of your username/password that you use to login to your account.  Once you have that all together, open up some FTP program, and
connect to the jangomail servers.  The Host is going to be clients.jangomail.com and the username/password are, of course, your username password.  Take the attachments that you want to include in your
mail outs and insert them into the attachments folder.  Simple as that.  Now it’s time to write some code, that is going to send out one basic test Transaction email.  The code is below.


$client = new SoapClient('https://api.jangomail.com/api.asmx?WSDL');
$parameters = array
    (
        'Username'          => (string) 'JangomailUsername',
        'Password'          => (string) 'JangomailPassword',
        'FromEmail'         => (string) 'noreply@yoursite.com',
        'FromName'          => (string) 'Your Website',
        'ToEmailAddress'    => (string) 'test@test.com', // Your email address
        'Subject'           => (string) 'Test Email',
        'MessagePlain'      => (string) 'This will show if they don\'t support HTML at their email service.',
        'MessageHTML'       => (string) '

Test HTML Email

Test HTML email text goes here.




',
        'Options'           => (string) 'OpenTrack=True,ClickTrack=True,Attachment1=fileattachment.pdf'

    );
 
try
{
    $response = $client->SendTransactionalEmail($parameters);
    echo "Message(s) sent!";
}
catch(SoapFault $e)
{
    echo $client->__getLastRequest();
}
?>

Just make sure your attachment is named the exact same as it was in the attachments folder.

Very simple. The hard part for me was the attachment. At first I was trying to figure out how to get it uploaded to the FTP that I was running the Jangomail system from…then finally realized it had to be
loaded into your Jangomail FTP system to work.

Good luck, and hope this helps.  Also their support systems are very helpful. I had some issues with the attachment systems, and they helped me work it out pretty easily. They have great developer support.

Comment with your Facebook Account


Comment Without Facebook

Leave a Reply

Your email address will not be published. Required fields are marked *