Thursday, February 18, 2016

Pet Peeve - Improper Grammar in Email

Dear People who type in all lowercase,

We are the difference in helping your Uncle Jack off a horse and helping your uncle jack off a horse.

Sincerely,
Capital Letters

Wednesday, February 17, 2016

MVC5/Ajax Form Notes

Reference - Ajax Modal Forms in MVC

Requirements
Process Flow
  • Use JavaScript to Render Form via Ajax and PartialView into <div>
  • Submit Form via JavaScript/Ajax
  • Controller validates data with validation client-side
Implementation:
  • Create Page with Empty Div to contain modal form
  • Create Click Event to Load Form
function openAddressDialog(id) {
    var data = {
        Id: id,
        CompanyId: $('#Id').val()
    };
    $.ajax({
        url: '/crm/customer/AddEditAddress/',
        contentType: 'application/html',
        data: data,
        success: function (content) {
            $('#dialogPlaceholder').html(content);
        },
        error: function (e) { }
    });
}
 
  • Create Partial View
@model Models.AddEditAddress
 
<div id="dialogResult"></div>
 
@using (Ajax.BeginForm("SaveAddressAjax""shared"new AjaxOptions
{
    HttpMethod = "POST",
    InsertionMode = InsertionMode.Replace,
    OnSuccess = "updateAddressSuccess()",
    OnFailure = "dialogFailure()",
    OnBegin = "dialogBegin()",
    OnComplete = "dialogComplete()",
    UpdateTargetId = "dialogResult"
}))
{
//… Rest of form code goes here.
}
 
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
<script src="~/Scripts/genericDialog.js"></script>
 
<script>
    $(document).ready(function () {
        $('#addEditAddressDialog').modal();
    });
 
 
 
 
    function updateAddressSuccess() {
        $('#addEditAddressDialog').modal("hide");
    }
</script>

Wednesday, September 3, 2014

eMail Compliance and General Guidelines

Domain Authentication


Sender Policy Framework - SPF

The Sender Policy Framework (SPF) is an open standard specifying a technical method to prevent sender address forgery. More precisely, the current version of SPF — called SPFv1 or SPF Classic — protects the envelope sender address, which is used for the delivery of messages. See the box on the right for a quick explanation of the different types of sender addresses in e-mails

Create a SPF Record and add to blank TXT record DNS under domain root.

Obtain all the email server IP addresses that will be used to Send email.  To help create your TXT record for your domain use the Microsoft Sender Policy Framework Wizard and paste the record in to your DNS record.

Use Kitterman's SPF Verification Tool to test your SPF Record. 

Sender Policy Framework Open Project - For Detailed Information on SPF Syntax and Implementation

Domain Keys Identified Mail - DKIM

DKIM attaches a new domain name identifier to a message and uses cryptographic techniques to validate authorization for its presence. The identifier is independent of any other identifier in the message, such in the author's From: field.  DKIM.org FAQ's

Create your DKIM key within your email provider such as Mail Enable or Exchange.

Create DKIM _DomainKey sub-domain.

Add your TXT "selector" to the subdomain in your DNS namespace  (ie: selector._domainkey.mydomain) and paste in the DKIM key.


Domain-based Message Authentication, Reporting and Conformance - DMARC

DMARC, which stands for "Domain-based Message Authentication, Reporting & Conformance", is a technical specification created by a group of organizations that want to help reduce the potential for email-based abuse by solving a couple of long-standing operational, deployment, and reporting issues related to email authentication protocols.

Make sure you setup your postmaster@mydomain.com and abuse@mydomain.com.

Test and Verify your SPF is setup correctly.

DMARC policies are published in the DNS as text (TXT) resource records (RR) and announce what an email receiver should do with non-aligned mail it receives.

Setup DMARC TXT RR for the domain "sender.mydomain.com" that reads:
"v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@mydomain.com"

Wednesday, September 12, 2012

Could the iPhone 5 save the US economy?

JP Morgan analyst Michael Feroli has writtn that Apple's iPhone 5 to be announced on September 12 could, by itself, grow the GDP between .25% and .5% in the fourth quarter.

Here is the math:
  1. Feroli says JP Morgan's other analysts say Apple will sell about 8 million phones for $600.
  2. Imported components should cost around $200 per phone, netting the GDP $400 per gadget.
  3. $400 x 8 million = $3.2 billion in GDP.
  4. $3.2 billion x four quarters = $12.8 billion.
  5. $12.8 billion = 33% boost.
  6. If the phone sells even better, the number gets closer to .5%.
.5% is a big boost. Most analysts predict the GDP will grow 1.5% to 2% in Q4.