JavaMail and office 365 relay

If you have ever wanted to use a relay option with office 365 and wondered how to make it work with javamail then this option will work for you.  To get it to work you also have to do work on the office 365 side like this

public class EmailHelperRelay extends EmailHelper {

    private static final String SERVIDOR_SMTP = "yourcompany-com.mail.protection.outlook.com";
    private static final int PORTA_SERVIDOR_SMTP = 25;

    private static final Logger s_log = Logger.getLogger(EmailHelperRelay.class.getName());

    public void sendEmail(String fromEmail, String toEmail, String messageToSend, String subject) {
     final boolean isLogging = s_log.isLoggable(Level.FINEST);
  if (isLogging) {
   s_log.entering(getClass().getName(), "sendemail");
        final Session session = Session.getInstance(this.getEmailProperties());
        try {
            final MimeMessage message = new MimeMessage(session);
            message.setRecipient(Message.RecipientType.TO, new InternetAddress(toEmail));
            message.setFrom(new InternetAddress(fromEmail));
            message.setText(messageToSend, "utf-8", "html");
            message.setSentDate(new Date());
        } catch (Exception ex) {
            System.err.println("sending email failed:"+ex.getMessage());
        if (isLogging) {
   s_log.exiting(getClass().getName(), "sendemail");

    private Properties getEmailProperties() {
        final Properties config = new Properties();
        config.put("mail.smtp.auth", "false");
        config.put("mail.smtp.starttls.enable", "true");
        config.put("mail.smtp.host", SERVIDOR_SMTP);
        config.put("mail.smtp.port", PORTA_SERVIDOR_SMTP);
        return config;

Blazing Rush

Prerequisites: channel positive energy, lay on hands
As part of a charge action, you can channel positive energy into your strike.
The amount of damage dealt is equal to 1d6 points of damage plus 1d6 points of damage for every two paladin levels beyond 1st (2d6 at 3rd, 3d6 at 5th, and so on). Creatures that take damage from channeled energy receive a Will save to halve the damage. The DC of this save is equal to 10 + 1/2 the paladin's level + the paladin's Charisma modifier.
Using this consumes one of your lay on hands uses for the day.
Tags: ,

Gunslinger feat - Fanning the Hammer

Prerequisites: Dex 13, Point-Blank Shot.
When making a full attack action with a firearm capable of more than one shot before reload, You can instead fire all your shots, as long as you have a free hand, and the first two shots are at -2, and increases by -2 fo for each pair of shots until you run out of shots loaded.  (3rd and 4th are at -4, 5th and 6th are at -6 and so on.

Getting Adobe Edge to work within WebSphere Portal

I recently had a request from one of my content developers to use adobe edge within WebSphere Portal.  At first I thought this was simple request and decided to oblige home.

How wrong I would be.  There are several problems with this in that the way Edge produces files and the way that it looks to load the files.
At first I tried to load this all into WCM and serve the content from there as would be normal with any other CMS you want your content in there.

I was able to get it to load the edge js but it could not find the app js or the images so back to the drawing board.

First I decided to see if I could get it working in just a web app.  This would let me remove many of the compexities of Portal but also see if I could get things working the way I thought they should work.  This was fairly easy as I was going right to the html page and it was able to find the items because everything was relative.

Next step put it into a portlet.  One of the things in the html for the app is that it states to put the edge runtime into the head.  Well on portal it is not something we want to load on every page, and I did not want to create a theme profile for every edge app we might have.  so I placed this into the portlet jsp.
I then changed this

To this

Now the edge js was loading and it was looking for the javascript for the actual application but it was getting 404s in the requests, and it was making it relative to the page url which would never work.  Next I actually had to edit the edge js file.  So what I had to do was use an unminifier to make it so I could edit this file.
I used http://unminify.com/
After that I changed this line

ba ? (window.edge_authoring_mode || (g ? (f.definePreloader(g), e()) : f.load(a + "_edgePreload.js", e)), a && (c && c.bootstrapLoading ? ka.push(a) : window.edge_authoring_mode && c.sym ? f.load(a + "_edge.js?symbol=" + c.sym) : f.load(a + "_edge.js"))) : window.edge_authoring_mode || (m ? (f.defineDownLevelStage(m), h()) : f.load(a + "_edgePreload.js", h))

To look like this

}), z ? (window.edge_authoring_mode || (i ? (l.definePreloader(i), s()) : l.load(t + "_edgePreload.js", s)), t && (n && n.bootstrapLoading ? Q.push(t) : window.edge_authoring_mode && n.sym ? l.load("/wps/PA_Mira/not-overlooked-day-resp_edge.js?symbol=" + n.sym) : l.load("/wps/PA_Mira/not-overlooked-day-resp_edge.js"))) : window.edge_authoring_mode || (r ? (l.defineDownLevelStage(r), a()) : l.load(t + "_edgePreload.js", a))

You can see how I had to hard code the location of the loading for the portlet context and the js, not great and I possibly could have done it so that it was more dynamic but at this point it seemed less than important.

With this change the js was loading but none of the images were.  so the next change I had to do was modify the root where it looked for images.
In the file not-overlooked-day-resp_edge.js

I modified following to have the context root for the portlet
var im='/wps/PA_Mira/images/',
Now all the images were loading just fine but I had this huge gap above the image and the animations so after some more digging I found in the edge js this section
g.css("margin-top", "auto"), g.css("margin-bottom", "auto")
I removed these and then my animation displayed just fine

I had originally started down this path by reviewing https://forums.adobe.com/thread/1120897 and http://stackoverflow.com/questions/21031943/edge-animate-files-not-working-in-cms

What can we learn from chewbacca mom?

I assume by now you have seen the video or at least have seen mention of this.  You might think it is funny or silly or something else but there is an important message that we can take away from this.  What does this have that many social media marketing moments miss?  Honesty.

What do I mean when I say honesty?  I mean it is true emotion, unfiltered straight from the person.  Honesty is one of the biggest drivers if you will have success or not in your social media marketing.  Are you leaving up negative reviews? Are you being honest about bad press?  Are you responding to negative interactions as well as positive?

You have to commit to social media from the top down.  You have to integrate it with your other marketing campaigns, and you have to behave according to your company values.  I know this is scary for many traditional marketers because they do not control all of the content, but dishonesty will lose you more than any single negative review.

Is your company brave enough?

Does the above represent how your companie feels?  As companies struggle with social media marketting, the biggest struggle is many times with its self.  How this often expresses itself is instead of focusing on how they can do better to improve the customer experience, they would rather focus on how they can control the content that exists about themselves.  This shows a very dated look at how we invision the way the customer interaction works.  Gone are the days of companies telling customers how things are and how they do business.

The new marketplace works by our customers telling others how we do business.  Customers want to rate us, tell others how we did, and find out from others how we did.  By having all this information readily available our customers can make a more informed decision.  Sometimes this shows the warts and all of what we are providing to the customer.

Some people see this and cringe thinking we have to protect our brand.  But what this really is is part of the honesty you can build with customers.  Additionally without feedback we never know how we are doing as a company.  The feedback and ratings give us a stick to measure ourself against.  When doing the measuring though you have to ensure that you do not use it as a stick to beat your staff, as sometimes there is just no pleasing the customer.  But that can still be a teaching moment.

In the end is your company brave enough to commit to engaging with customers and dealing with their comments and reviews sometimes on your own site.  Are you willing to use it as a tool to help establish your honesty and credability with your customers?  Are you able to see it for what it truly is?  If so these kind of engagements can lead to lasting customer relationships instead of just simple blasting information through your various channels at your customers.

5 Tips for GMing for 1st level characters

Today we will look at the special challenge of running a game for first level characters.  As the namesake for this blog, the Dire Rat is often tasked with this role.  Additionally so is the orc and goblin.  Often these low level creatures are tasked to be filler with some minor story behind them and get them to later levels.  I think Paizo has shown some nice ways to add to the normal filler of first level.  Here are 5 tips to think when making challenges for first level characters.

1. It's not just about combat
What I mean about that is, just using combat to get to your low level characters, often does not help the characters learn who they are and all the fun tricks they have.  If you look in skull and shackles adventure path you can see how the first level adventurers do tasks with skills like acrobatics, climb and cooking to get through the lower levels and complete pieces of the action.

2. Roleplaying is not rewarded enough
Remember people can talk their way through situations and finding information,  make plot points and rewards that drive this forward.  This helps to install the tone and get your group talking to each other.  Find a method to reward players.  I give each player 10 poker chips which they give to others for good roleplaying and they can then use for a +1 on a die roll.  all used are added up and each are worth 10 xp per at the end of the night

3. Avoid bursty combat at 1st level
No one wants to die at first level to some crazy crits that happen.  If they do happen make sure it is not the afore mentioned random orc, but at least a named orc.  Make it a memorable death and something that will be fun to happen and stories told about it for a while

4. Give them direction
Give them something to be invested in, in that location, it may be a springboard they never see again, but make it so they can interact with them and not the general you all meet in an inn.  Make it so they feel a part of the world and not just punching holes to get to someplace more interesting.

5. Reward the character
Keep the rewards equal to their level, maybe some consumables, maybe some other items, but don't give a deck of many things, but try to make sure it is something they can use and not something that is just gold filler.  Also tease them into the next adventer