Wednesday, February 22, 2012

JangoSMTP: We’ve got your back.

Want to make sure your email is safe? We know you do. That’s why
JangoSMTP’s got your back.

Wielding an unbeatable combination of superpowers, cutting edge email deliverability
tools, and a new interface as sleek as her outfit, JangoSMTP is your email’s
superhero.

You can stop worrying now. With a transactional service this bad ass, kick back and relax. JangoSMTP’s got your back, so your email will get where it needs to go.




JangoSMTP: Your email’s superhero.

Not a customer yet and want to see just how bad ass transactional email marketing
can be? Be our guest. Sign up for a free JangoSMTP account at http://www.jangosmtp.com/Free-Account.asp.

Tuesday, February 21, 2012

New dead simple process to upgrade your JangoSMTP account

We've now made it dead simple to upgrade your account.  We always email the account manager alerts when your account is nearing your quota.

In the past, if you were a trusted user with a sending history with JangoSMTP, you had the ability to upgrade your account by yourself through the UI.  If you didn't have an established sending history, however, you had to contact Support, type out a message to request an account upgrade, and then wait for your support ticket to be answered. This was a frustrating process for users that relied on JangoSMTP sending transactional email for their apps seamlessly and transparently.


Now, all users, regardless of sending history, can upgrade their account on their own through the UI.  If you're a trusted user, then your account upgrade will take effect instantly.  If you're not a trusted user, then you can still use the upgrade process in the UI, but your upgrade request will be reviewed by a support team member before taking effect. The review process will only take a few minutes, requests are monitored 24x7.

Monday, February 13, 2012

Using JangoSMTP in ASP.Net

Microsoft provides classes for sending SMTP emails using the .Net Framework. This example uses System.Net.Mail to assemble then send an email using JangoSMTP.

Download the source code for this example, insert your own JangoSMTP username/password/etc and start sending tracked transactional emails in your asp.net application.

MailMessage mailMsg = new MailMessage();

// set the from address
// this must be stored in your from addresses
mailMsg.From = new MailAddress(
    "YourEmail@YourDomain.com", "Your Name");

// recipient
mailMsg.To.Add(new MailAddress(
    "ToAddress@Domain.com", "Recipient Name"));

// set the subject and message portions of the email
mailMsg.Subject = "Test Email Subject";
string text = 
    "This plain text email was sent from an ASP.Net script.";
string html = 
    "<p>This html email was sent from an ASP.Net script.</p>";
mailMsg.AlternateViews.Add(
    AlternateView.CreateAlternateViewFromString(
        text, null, MediaTypeNames.Text.Plain));
mailMsg.AlternateViews.Add(
    AlternateView.CreateAlternateViewFromString(
        html, null, MediaTypeNames.Text.Html));

// set up the SMTP client with relay.jangosmtp.net
SmtpClient smtpClient 
    = new SmtpClient("relay.jangosmtp.net", 25);
System.Net.NetworkCredential credentials = 
    new System.Net.NetworkCredential(
         "Your JangoSMTP Username", "Your JangoSMTP Password");
smtpClient.Credentials = credentials;

smtpClient.Send(mailMsg);

Wednesday, February 8, 2012

Sending Transactional Emails from a PHP Script

It's easy to send SMTP emails using PHP and JangoSMTP. Just upload the Swift Mailer library to your server, then set up an SMTP email using swift.

This example demonstrates how to set up and send an email from a PHP script using JangoSMTP. Download the source code for this example, insert your own JangoSMTP username/password/etc and you're ready to rock!

// include the Swift Mailer code
include_once "Swift/lib/swift_required.php";
 
// Set up the plain text body of the email
$text = "A plain text message sent from a PHP script!\n";
// set up the HTML portion of the email
$html = <<<EOM
<html>
  <head></head>
  <body>
    <p>This is an HTML message sent from a PHP script!
    </p>
  </body>
</html>
EOM;
 
// set the from address
// this must be an address stored in your JangoSMTP settings
$from = array('YourEmail@YourDomain.com' => 'Your Name');
// add recipients
$to = array(
  'ToAddress@Domain.com'=>'Recipient Name'
);
// set the subject of the email
$subject = 'JangoSMTP Transactional Email from PHP';
 
// your JangoSMTP login credentials
$username = 'Your JangoSMTP Username';
$password = 'Your JangoSMTP Password';
 
// setup Swift mailer parameters
$transport = 
    Swift_SmtpTransport::newInstance('relay.jangosmtp.net', 25);
$transport->setUsername($username);
$transport->setPassword($password);
$swift = Swift_Mailer::newInstance($transport);
 
// set up the email message in swift
$message = new Swift_Message($subject);
// set the body of the email
$message->setFrom($from);
$message->setBody($html, 'text/html');
$message->setTo($to);
$message->addPart($text, 'text/plain');
 
// send the message through jangosmtp
if ($recipients = $swift->send($message, $failures))
{
 // inform the user if sending succeeds
 echo 'Email sent to '.$recipients.' users';
}

Monday, February 6, 2012

How to Send Joomla Emails Through JangoSMTP

If you're using Joomla to manage your website, then you don't need any additional plugins to start sending through JangoSMTP. Just go to Global Configuration, then Server, then change the Mail Settings in the lower right-hand corner of that screen.

Mailer: SMTP
From Email: Your Stored From Address
From Name: Your Name
SMTP Authentication: Yes
SMTP Port: 25 SMTP
Username: Your JangoSMTP Username
SMTP Password: Your JangoSMTP Password
SMTP Host: relay.jangosmtp.net

Your settings should look something like this:

Tuesday, January 24, 2012

Sending Transactional Messages from a Ruby Application

Do you need to send transactional emails from a Ruby application? Do you need open tracking, DKIM signing and easy to read reports? If so, then JangoSMTP is your solution.

This example demonstrates how to send messages using JangoSMTP from within a Ruby application. You will need the Mail gem, which can be installed with the command gem install mail.

After the mail gem is installed, download the source code for this example and insert your own JangoSMTP username/password/etc. It's as easy as that!
require 'mail'

Mail.defaults do
  delivery_method :smtp, { :address   => "relay.jangosmtp.net",
                           :port      => 25,
                           :domain    => "YourDomain.com",
                           :user_name => "Your Username",
                           :password  => "Your Password",
                           :authentication => 'plain',
                           :enable_starttls_auto => true }
end

# Set up your email
# The from address must be stored in your list of from addresses
# see Settings > Advanced > From Addresses
mail = Mail.deliver do
  to 'To@EmailAddress.com'
  from 'From Name <FromAddress@YourDomain.com>'
  subject 'This is the subject!'
  text_part do
    body 'This plain text email was sent by Ruby!'
  end
  html_part do
    content_type 'text/html; charset=UTF-8'
    body '<b>This HTML email was sent by Ruby!</b>'
  end
end

Monday, January 23, 2012

Integrating JangoSMTP with Java

Since Oracle provides the JavaMail package for sending emails in Java, it's easy to integrate JangoSMTP into your current Java software.

First, you need to obtain the JavaMail library. If you're using the enterprise edition of Java, then you probably already have JavaMail installed. Otherwise, you will need to unzip the contents and add them to your buildpath in Eclipse, or your classpath in Windows. To add the package to your buildpath, click Project > Properties > Libraries > Add External JARs.

Then you can use JavaMail to connect to the JangoSMTP server and send a message. You should connect to relay.jangosmtp.net using your JangoSMTP credentials. We've already built a simple example that will connect to JangoSMTP to send a message.

Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", "relay.jangosmtp.net");
props.put("mail.smtp.port", 25);
props.put("mail.smtp.auth", "true");
 
// set up a new authenticator
Authenticator Authorization = new SMTPAuthenticator();
Session JangoSMTPSession = 
             Session.getDefaultInstance(props, Authorization);
Transport transport = JangoSMTPSession.getTransport();
 
// this object will hold the details of the email
MimeMessage EmailMessage = new MimeMessage(JangoSMTPSession);
 
// store the plain text and HTML portions of our email
Multipart MultipartContent = new MimeMultipart("alternative");
 
// first set the plain text message
BodyPart part1 = new MimeBodyPart();
part1.setText(PlainTextMessage);
MultipartContent.addBodyPart(part1);
 
// then set the HTML message
BodyPart part2 = new MimeBodyPart();
part2.setContent(HTMLMessage, "text/html");
MultipartContent.addBodyPart(part2); 
 
EmailMessage.setContent(MultipartContent);
        
// Set the From Address.
// Must be a sender that is saved in your from-addresses.
EmailMessage.setFrom(new InternetAddress(FromAddress));
        
// Set the subject
EmailMessage.setSubject(Subject);
        
// set the to-address
EmailMessage.addRecipient(Message.RecipientType.TO,
                                new InternetAddress(ToAddress));
 
// Connect, Send the Message, and Close the Connection
transport.connect();
transport.sendMessage(EmailMessage, 
          EmailMessage.getRecipients(Message.RecipientType.TO));
transport.close();

With the authentication code that is in the example file, this code will allow you to construct and send a transactional email using JangoSMTP. This email will contain all the tracking and other features set up in the settings section of the JangoSMTP site.