JangoMail FAQs

PHP

Please see the following articles regarding the use of PHP:

Sending transactional emails with PHP
Another code example
Blog post: PHP/API examples

Here is a simple example of sending a message, including the use of the CC mail option:

<?php

$client = new SoapClient('https://api.jangomail.com/api.asmx?WSDL');
$parameters = array
(
'Username' => (string) 'your JangoSMTP username',
'Password' => (string) 'your JangoSMTP password',
'FromEmail' => (string) 'the_from_address@somewhere.com',
'FromName' => (string) 'the_from_name_you_want',
'ToEmailAddress' => (string) 'the_to_address@somewhere.com',
'Subject' => (string) 'Transactional Subject',
'MessagePlain' => (string) 'Transactional Plain (plain text)',
'MessageHTML' => (string) '<b>Transactional HTML and whatever else your message contains</b> (html)',
'Options' => (string) 'CC=some_copy_address@somewhere.com,OpenTrack=True,ClickTrack=True'
);

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