Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Friday, January 24, 2014

On Track With Jack: It's Time to turn off EditLive


Hi JangoMail Users!

It's always hard to say goodbye, but it's time to bid adieu to a special friend. We've had our ups and downs, but lately there have been mostly downs. Sometimes you just know when it's time for someone to retire. With mixed emotions (but mostly excitement), I give you my tip for the week:


Turn off EditLive and Switch to Our TinyMCE(v3) Editor


EditLive works with Java, which for a very long time has caused lots of headaches for you and our support team. While browsers and Java update with the times, EditLive does not. In the past, these updates caused problems, but now we've finally hit a point where the latest Java update has caused EditLive to stop all together.

Luckily we have another editor that works great! The Advanced editor doesn't need Java and therefore doesn't error out like EditLive does.

As a reminder, here are a few benefits of using our Advanced editor:

  • If you can't resist copying from Word, use the new "Paste from Word" button. NOTE: We do NOT recommend creating any emails using Word. Copy/paste text using Notepad or a Simple Text Editor instead.

  • You do not have to wait for Java to load, and there are no error messages. 
  • Agencies: You can also lock content by restricting subaccounts from editing certain parts of an email. (This is more of an advanced tip: When using EditLive, in the HTML, you would tag an item as conenteditable="false". Now you can do that here too, add class="readonly".) 

To verify that you are using our TinyMCE(v3) editor, follow these steps:
  1. Click Settings.
  2. Select Authoring to expand section.
  3. In the last option, Preferred HTML Editor, check to see if TinyMCE is listed.
  4. If not, click the pencil icon to edit.








  5. Select TinyMCE.
  6. Press Save. 



Are you still using the old user interface? Here's some directions on how to switch there:

  1. Click Settings.
  2. Visit the Send E-Mail Page link.
  3. Choose TinyMCE for the HTML Editor.
  4. Click the Save Changes button.




If you haven't used our Advanced Editor before and have questions, our support team is here to help you transition.

Sincerely,

Jack the Jangolope
Department of Awesome
JangoMail




About Jack
Jack the Jangolope is our JangoMail mascot.  Each week, look for Jack's emails for marketing advice, trends, and quick tips on how to grow your email marketing plan to the fullest!  Hop into email marketing each week with Jack's helpful tips!
We want to hear from you. Remember, at JangoMail it's your email, your way.  Have a topic you would like Jack to cover?  Email us at marketing@jangomemail.com with the subject line: On Track With Jack.  Follow Jack on Facebook

Monday, February 27, 2012

Integrating the JangoMail API Into a Java Application

If you want to integrate JangoMail's web service into your company's existing Java software, this example will show you how to hit the ground running. This example relies on Java's built-in library for processing soap requests javax.xml.soap. Download the source code for this example here.

In the first part of this example, the SOAPMessage is created. In this case, we will call the Groups_GetList_String method, which will return a list of groups on your account. Make sure to set the SOAPAction header to indicate which method you want to call.

// create the connection
SOAPConnectionFactory soapConnFactory 
    = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnFactory.createConnection();

//Next, create the actual message/request
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
          
//Create objects for the request parts            
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
  
// set the SOAPAction Header to the desired request
MimeHeaders headers = message.getMimeHeaders();
headers.addHeader("SOAPAction", 
    "http://api.jangomail.com/Groups_GetList_String");
Next, the message is populated with our parameters and sent to the JangoMail servers.
// Populate the body of the request
// create the main element and namespace
SOAPElement bodyElement = body.addChildElement(
        envelope.createName("Groups_GetList_String", 
                            "", 
                            "http://api.jangomail.com/"));
   
// add the parameters
bodyElement.addChildElement("Username")
    .addTextNode("Your JangoMail/JangoSMTP Username");
bodyElement.addChildElement("Password")
    .addTextNode("Your JangoMail/JangoSMTP Password");
bodyElement.addChildElement("RowDelimiter").addTextNode("\n");
bodyElement.addChildElement("ColDelimiter").addTextNode(" - ");
bodyElement.addChildElement("TextQualifier").addTextNode("");
   
// save the message
message.saveChanges();
   
// Send the message and print the reply
// set the destination
String destination = "http://api.jangomail.com/api.asmx";
// send the message
SOAPMessage reply = connection.call(message, destination);
Finally, the response is received and printed.
//Check the output
System.out.println("\nRESPONSE:\n");

//Create the transformer
TransformerFactory transformerFactory 
    = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();

//Extract the content of the reply
Source sourceContent = reply.getSOAPPart().getContent();

//Set the output for the transformation
StreamResult result = new StreamResult(System.out);
transformer.transform(sourceContent, result);
System.out.println();
Make sure to Download the complete source code for this example and populate it with the values from your JangoMail or JangoSMTP account.