Personal Finance Blog by Money Ning
A personal finance blog where we share insights on frugal living, investing, debt reduction, credit cards, online savings accounts and stock brokers
Unsorted_Bookmarks 
december 2011
What is Your Money Personality. Take This Online Test and Find Out.
What's Your Money Personality? Are you a balanced spender/investor or are you a Binge Spender? A Big Spender or a Micromanager? Take this fun quiz to
Unsorted_Bookmarks 
december 2011
Rewriting in Style
Rewriting in Style: Writers and editors might review this 1960 F.L. Lucas essay, On the Fascination of Style, brought to my attention by Stan Carey. Much is still relevant, particularly these principles:

First, honesty. In literature, as in life, one of the fundamentals is to find, and be, one’s true self. …. In writing, in the long run, pretense does not work. …. If handwriting reveals character, writing reveals it still more. You cannot fool all your judges all the time.Secondly, courtesy — respect for the reader. From this follow several other basic principles of style. Clarity is one. For it is boorish to make your reader rack his brains to understand. One should aim at being impossible to misunderstand — though men’s capacity for misunderstanding approaches infinity.Brevity is another basic principle. For it is boorish, also, to waste your reader’s time. …. [B]revity is often more effective; the half can say more than the whole, and to imply things may strike far deeper than to state them at length.

This week, Carnegie Mellon will have me back to talk to students in the program I graduated from, one founded after the Plain Language Movement in the early ’70s. It was there, in a course called “Style,” that we learned to practice (and practice) clarity, brevity, and respect for readers. And that much of writing is really rewriting.
from google
october 2011
Create Perfect Emails For Your WordPress Website
 



 





Whatever type of website you operate, its success will probably hinge on your interaction with your audience. If executed well, one of the most effective tools can be a simple email.

WordPress users are in luck, since WordPress already has easy-to-use and extendable functions to give you a lot of power and flexibility in handling your website’s emails.

In order to create our own system, we will be doing four things. First, we will create a nice email template to use. We will then modify the mailer function so that it uses our new custom template. We will then modify the actual text of some of the built-in emails. Then we will proceed to hook our own emails into different events in order to send some custom emails. Let’s get started!

How WordPress Sends Emails
WordPress has a handy function built in called wp_mail(), which handles the nitty-gritty of email sending. It is able to handle almost anything you throw at it, from custom HTML emails to modifications to the “From” field.

WordPress itself uses this function, and you can, too, by using WordPress hooks. You can read all about how hooks work in WordPress, but here is the nutshell version, and we will be working with them in this article so much that you’ll learn it by the end.

Hooks enable you to add your own functions to WordPress without modifying core files. Without hooks, if you wanted to send a publication notice to the author of a post, you would have to find the function that published the post and add your own code directly to it. With hooks, you write the function for sending the email, and then hook it into the function that publishes the post. Basically, you are telling WordPress to run your custom function whenever the function for publishing posts runs.

Setting Up Shop
The first thing we’ll have to do is create a plugin. We could get away without it and just use our theme’s functions file, but this would become clunky in the long run. Don’t worry: setting up a plugin is super-easy.

Go to your website’s plugins folder, which can be found under wp-content. Create a new folder named my_awesome_email_plugin. If you want a different name, use something unique, not email or email_plugin; otherwise, conflicts might arise with other plugins.

Create a file named my_awesome_email_plugin.php in the new folder. The name of the file (without the extension) must be the same as the name of the folder.

Edit the contents of my_awesome_email_plugin.php by copying and pasting the code below and modifying it where necessary. This is just some default information that WordPress uses to show the plugin in the plugins menu in the admin area.

<?php
/*
Plugin Name: My Awesome Email Plugin
Plugin URI: http://myawesomewebsite.com
Description: I created this plugin to rule the world via awesome WordPress email goodness
Version: 1.0
Author: Me
Author URI: http://myself.me
*/

?>

Once that’s done, save the file, go to the WordPress admin section, and activate your new plugin. If you’re new to this, then congratulations! You have just created your first working WordPress plugin! It doesn’t really do anything yet, but don’t let that bother you. Just read on, because we’ll be adding some functionality after the next section.

Creating An Email Template
Creating good email templates is worth an article on its own. I will just share the method that I use, which does not mean that doing it differently is not allowed. Feel free to experiment!

I am not a big fan of using images in emails, so we will be building an HTML template using only CSS. Our goal is to come up with a template to which we can add a header and footer section. We will send our emails in WordPress by pulling in the header, putting the email text under that and then pulling in the footer. This way, you can change the design of your emails very easily just by modifying the templates.

Without further ado, here’s the code for the email template that I made. Or you can download it as an HTML file (right-click, and then select “Save as”). If you want a quick preview of what it looks like, just click the link.

<html>
<head>

<title>The Subject of My Email</title>

</head>
<body>
<div id="email_container" style="background:#444">
<div style="width:570px; padding:0 0 0 20px; margin:50px auto 12px auto" id="email_header">
<span style="background:#585858; color:#fff; padding:12px;font-family:trebuchet ms; letter-spacing:1px;
-moz-border-radius-topleft:5px; -webkit-border-top-left-radius:5px;
border-top-left-radius:5px;moz-border-radius-topright:5px; -webkit-border-top-right-radius:5px;
border-top-right-radius:5px;">
MyAwesomeWebsite.com
</div>
</div>

<div style="width:550px; padding:0 20px 20px 20px; background:#fff; margin:0 auto; border:3px #000 solid;
moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; color:#454545;line-height:1.5em; " id="email_content">

<h1 style="padding:5px 0 0 0; font-family:georgia;font-weight:500;font-size:24px;color:#000;border-bottom:1px solid #bbb">
The subject of this email
</h1>

<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Aenean commodo ligula eget dolor. Aenean massa
<strong>strong</strong>. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur ridiculus
mus. Donec quam felis, ultricies nec, pellentesque
eu, pretium quis, sem. Nulla consequat massa quis
enim. Donec pede justo, fringilla vel, aliquet nec,
vulputate eget, arcu. In enim justo, rhoncus ut.
</p>
<p>
Imperdiet a, venenatis vitae, justo. Nullam dictum
felis eu pede <a style="color:#bd5426" href="#">link</a>
mollis pretium. Integer tincidunt. Cras dapibus.
Vivamus elementum semper nisi. Aenean vulputate
eleifend tellus. Aenean leo ligula, porttitor eu,
consequat vitae, eleifend ac, enim. Aliquam lorem ante,
dapibus in, viverra quis, feugiat a, tellus. Phasellus
viverra nulla ut metus varius laoreet. Quisque rutrum.
Aenean imperdiet. Etiam ultricies nisi vel augue.
Curabitur ullamcorper ultricies nisi.
</p>

<p style="">
Warm regards,<br>
The MyAwesomeWebsite Editor
</p>

<div style="text-align:center; border-top:1px solid #eee;padding:5px 0 0 0;" id="email_footer">
<small style="font-size:11px; color:#999; line-height:14px;">
You have received this email because you are a member of MyAwesomeSite.com.
If you would like to stop receiving emails from us, feel free to
<a href="" style="color:#666">unregister</a> from our mailing list
</small>
</div>

</div>
</div>
</body>
</html>

Remember that this is an email, so the HTML won’t be beautiful. The safest styling method is inline, so the fewer frills you can get away with, the better.

Let’s split this into two parts. The header part of the email is everything from the top right up to and including the h1 heading on row 23 (i.e. lines 01 to 23). Copy that bit and paste it into a new file in your my_email_plugin folder, and name it email_header.php. The footer part of the email is everything from the paragraph tag before “Warm regards” right until the end (i.e. lines 48 to 64). The text between the header and footer is just a placeholder so that you can see what the finished product will look like. We will fill it with whatever content we need to send at the time.

Preparing The WordPress System For Our Emails
By default, WordPress sends plain-text emails. In order to accommodate our fancy HTML email, we need to tell the wp_mail() function to use the HTML format. We will also set up a custom “From” name and “From” address in the process, so that the email looks good in everyone’s inbox. To accomplish this, we’ll be using the previously mentioned hooks. Let’s look at the code; explanation follows.

add_filter ("wp_mail_content_type", "my_awesome_mail_content_type");
function my_awesome_mail_content_type() {
return "text/html";
}

add_filter ("wp_mail_from", "my_awesome_mail_from");
function my_awesome_mail_from() {
return "hithere@myawesomesite.com";
}

add_filter ("wp_mail_from_name", "my_awesome_mail_from_name");
function my_awesome_email_from_name() {
return "MyAwesomeSite";
}

On line 01, we have defined that we are adding a filter to the WordPress function wp_mail_content_type(). Our filter will be called my_awesome_mail_content_type. A filter is nothing more than a function, so we need to create the function my_awesome_mail_content_type().

Remember that actions are functions called from within other functions? We add an action to the wp_insert_user() function, and the action is performed whenever wp_insert_user() runs. Filters are specified in much the same way; but, instead of running alongside the function that it is called from, it modifies the value of the entity that it is called on.

In our case, this means that somewhere inside the wp_mail() function is a variable that holds the email type, which is by default text/plain. The filter hook wp_mail_content_type is called on this variable, which means that all attached filters will be run. We happen to have attached a filter to it on line 01, so our function will perform its task. All we need to do is return the value text/html, which will modify the value of the variable in the wp_mail function to text/html.

The logic behind the rest of the code is exactly the same. Adding a filter to wp_mail_from enables us to change the sender’s address to hithere@myawesomewebsite.com, and adding a filter to wp_mail_from_name enables us to change the sender’s name.

Modifying Existing WordPress System Emails
Welcoming New Users

This is the content of the default WordPress email.

As mentioned, WordPress has a bunch of built-in emails that can be easily controlled (using hooks, of course). Let’s mod[…]
WordPress  email  plugins  from google
october 2011
« earlier      
"bike_there" $$$ 'Cool_Websites_and_Tools'_series 3D 3D_printing @Not_for_Syndication [Folder_Name] _Airlines_ _Alcohol_ _Archives_ _Ask_Lifehacker_ _Ask_the_Readers_ _Audio_ _Backup_ _Backup_utilities_ _Backups_ _Bandwidth_ _Beta_Beat_ _Black_Friday_ _bookmarking_ _Bookmarklet_ _Bookmarklets_ _Bookmarks_ _Browsers_ _Budgeting_ _Burning_ _Calendars_ _Capture_tools_ _cd_case_ _CDs_ _Charts_ _cheatsheets_ _Clever_Uses_ _Clips_ _Clutter_ _Collaborate_ _Collaboration_ _Command_Line_ _Compact_Calendar_ _Coupons_ _Data_ _Deals_ _Desktop_ _Desktops_ _Diagrams_ _Digital_Music_ _DIY_ _Document_management_ _Documents_ _Download_ _Downloads_ _DVDs_ _Eat_to_Live_ _Education_ _Email_ _Excel_ _Experimental_Firefox_Extensions_ _Facebook_Tip_ _Feature_ _Featured_Download_ _Featured_Firefox_Extension_ _Featured_Windows_Download_ _Firefox_ _Firefox_3_ _Firefox_Extensions_ _Firefox_Tip_ _Flow_ _Flowchart_ _Folding_ _Formatting_ _Freelancing_ _Frugality_ _Fun_ _future_proof_ _Gadgets_ _GeekTool_ _Gift_Giving_ _Gift_Ideas_ _Gmail_ _Google_ _Google_Chrome_ _Google_Docs_ _Graph_Paper_ _Highlights_ _Hive_Five_ _Holidays_ _Household_ _How_To_ _Image_Editing_ _Images_ _in_brief_ _Inspiration_ _Internet_Explorer_ _Internet_Explorer_7_ _Intrepid_Ibex_ _Job_search_ _Journal_ _journals_ _Kitchen_ _Languages_ _Learning_ _Lifehacker_Top_10_ _Linux_ _Linux_101_ _Linux_Tip_ _Mac_OS_X_ _Mac_Tip_ _Memberships_ _Memory_ _Microsoft_Office_ _Microsoft_Word_ _Microsoft_Word_2007_ _Money_ _Motivation_ _Movies_ _Mp3_ _Music_ _Newspaper_ _Office_ _Office_culture_ _Offline_ _Offline_access_ _OpenOffice_ _Opera_ _Packaging_ _Paper_ _Papercraft_ _Passwords_ _PDF_ _PDFs_ _Personal_Finance_ _Photos_ _Planning_ _Podcasts_ _Portable_Firefox_ _Powerpoint_ _Price_comparison_ _Printables_ _Procrastination_ _python_ _Reader_Guide_to_Lifehacker_ _Remember_the_Milk_ _Renting_ _Research_ _Resume_ _RSS_ _RSS_reader_ _Safari_ _Saving_ _Saving_Money_ _Scanner_ _Scanner_Hacks_ _Scanners_ _Search_ _Search_engines_ _Search_Techniques_ _Security_ _Self_Education_ _Shopping_ _sidebar_ _Signatures_ _Social_ _Social_Networking_ _Storage_ _streaming_music_ _stylish_ _Syncing_ _task_management_ _Task_manager_ _Teach_Yourself_ _Templates_ _Text_ _Thunderbird_ _Timer_ _Top_ _Travel_ _Tumblelogs_ _Tweaks_ _Typing_ _Ubuntu_ _Vacation_ _Video_ _Web_2.0_ _web_applications_ _Web_as_Desktop_ _Web_Browser_ _Web_browsers_ _Web_Browsing_ _Web_clipping_ _Web_Clippings_ _Web_publishing_ _webapp_ _Webapps_ _WiFi_ _Windows_ _Wireless_ _wireless_network_ _wireless_router_ _word_ _WordPress_ _Work_ _workflow_ _Writing_ activities Add-ons Adobe_AIR Adsense AdSense_for_RSS advanced_search Advertising Advertising_Promotion_and_PR Advice Aired alarms Alerts Alex_Varanese Ali amazing_skydiving_video Analysis analytics Andy Andy_Gilmore Andy_Wibbels animals animation Announcements anti-graffiti APIs Apply_Other_For_Impact_Ideas Apps Art Artist Arts Arts/History Arts_&_Culture Artwork aspirin audio Audio_Editing Automation Automobiles awareness_exercise Awesome_Apps back_health back_pain back_pain_relief backpack Backup Backup_utilities bad_posture Banking Banks banksy Beach_art beforevacay berkshire_hathaway best Best_Practices Bicycle Bills Billy_Boyd binder_clips Bird blog_carnivals Blog_Promotion blog_tips Blogging Blogging_for_Dollars Blogging_Tools_and_Services Blogs Body Bolivia book Book_Excerpt book_review Bookmarklets Bookmarks Bookmarks_Toolbar Books Brain Brainstorming BrainStuff branches Branding Broken_by_Design browsing Budget budgets Business business_marketing business_negotiation business_tips Calendar Calendars California Camera Cameras Cannes_Lions_2010 canning cant_ignore_social_media_marketing Car Career Careers Cars Case_Studies Case_Study Cast-iron_skillet ceevee Cellphones Change chat Cheat_Sheets cheatsheets China Chow_and_Theater chrome City Civil_Liberties clarity cleanhaven Clever_Uses clipping Clips Cloud_Computing Clutter CMO CMS CMS_Themes CNN_Big_Tech Code_Scripting_Process_Project_Management_and_Workflow Coding Collaboration Collages college_humor Color Color_Tools Comics Commerce Communicate_Your_Case Communities Comparisons Compatibility Computers concept_feedback Congress Content_Marketing content_strategy Contests Continual_Learning Conversion Cooking Cool_Software_Apps cool_web_apps cords core_strength cover_letter Craft Crafts Crime CS_for_SB CSS CSS3 Current_Affairs custom_posts Customization cute cyber_warfare cyberwar Dance Data david_swensen Death Debt decision-making decor Decoration Demo design Design_Articles Design_studio Design_Tool DesignTheory Desk Desktop Desktops Dev Developer's_Toolbox Developer_Tools Development DevTools Diet Digg digital_images Digital_Photography Digital_Photos Digital_Video Digital_Videos direct_mail_campaigns directions Distraction Distractions DIY DIY_Creations DIY_in_a_Disposable_Age DIY_Week DM Documentaries Documents dogs door_chains downloads dream Drinking Drinks dropbox Dutch E-Learning East_Asia Eastern_Congo eBook Ecommerce Economics Education effectiveness efficiency Election Electricity Electronics Elijah_Wood email Email_Marketing Energy Energy_conservation Energy_saver Energy_Savers English Enterprise_2.0 Entertaining Entertainment entertainment_group entrepreneur Entrepreneurship entry-level_jobs Ergonomics Events Excellence experience Extension_Settings Extensions External_Drives extrovert Facebook Fashion fear Feature Featured Featured_Firefox_Extension Featured_Mac_Download Featured_Posts Features Feed_reader Feed_Readers File_Explorer File_Recovery File_Sharing File_Storage Filling_the_Void Film Finance finances Financial Finder finding_readers Firefox Flickr Focus follower Fonts food food_forests Food_Hacks Food_Week Forms forum_on_emotion Forums Found Foursquare France Free Free_Software Freebies freedom freelance freelancing French Front_Page Fun Functionality funny funny_fashion Galleries Gallery gardening gen-y General_Nerdism get_rich get_your_brain_right getting_started Getting_Things_Done Gif_Magic gifs GIS giveaway goal goal-setting goal_setting Goals google google-analytics google_analytics Google_Calendar google_chrome Google_Maps Google_School google_search google_seo_tools Google_Voice Government_and_Legal Graffiti_&_Drawing Graphic_Design graphics Graphics_Design gray_ghost Greg_Mortenson groups growth GTD Guerilla_Action_&_Art guerrilla_action Guest_Post hackers hacks hacktivism hahahahakakaka happiness Hard_Drives Hardware Health Health_and_Fitness Helmo Hipster_PDA History Hive_Five HnP Hoaxes Hobbies Holidays home Home/Living Home_Furnishings hooks Horizons Household How-To How-To_Articles How_Do_You_Work? how_of_happiness How_To How_to_get_your_dream_job how_to_improve_posture hunch_back hurricane_katrina Hutch_Carpenter Ian_McKellen iChat ideal_world Ideas Identity Illustration Illustrations Illustrator Image Image_Editing Image_Search images in_the_real_world India Infographic infographics Injury_Prevention Innovation insomnia Inspiration Intentional interior International Internet internet_tools internships Interview_Skills interviewing Interviews introspection introvert Investing investment Invoices iPhone Irish Jan_Banning Japan Japanese JavaScript Jeremy_Schoemaker Jim_Denevan Job Job-Hunting job_hunting Job_satisfaction Job_search Jobs JQuery kazakhstan Keith Keyboard Keyboards keyword_research keyword_research_tools Kitchen Kodak L! Landing_Pages Landscapes Language Laptops Launch_Your_Career Launching_a_Blog Learning learning_language Leopard Liberia life life_management Lifehacks lifestyle_design Lighting LinkedIn links Linux Literature LLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOOOOOOLLLLLLLLLLLLLLLLLLLLL Local Locations_&_Services long_term_goals Longevity low_pack_pain Mac Mac_OS_X MacGyver_Tip magento mailing_services make_legit_money_online make_money_online MAKE_Video Maker_Faire MakeUseOf_Lists Management Maps Marketing Marlo Matroyshka_dukker Maurizio_Bongiovanni maxwell McDonald's mcdonalds Media Media_Centers Medicine Meditation Meetings memes Mental_Performance Metrics Milan Military Mind_Hacks Mindfulness MindMapApps mindmaps Miscellaneous_Blog_Tips mission Mobile mode Money money_management Monika Most_Popular Motivation Mouse Mozilla_Firefox Mp3 MP3s Muhammad_Saleem Music Music/Movies mysql nature neck_pain Netbook new New_Fashion New_folder New_Music New_Orleans News Non_Sequiturs Nonconformity Not_Categorized notebook notebooks Notes Notifications now NYT_Enterprise obama Oddities Office Office_Supplies_Fetish Offline Offline_access olympia on_page_SEO Online_identity online_jobs online_publishing online_videos Organization organized Organizers Organizing_Jobs Origami Other outdoor Outdoors Outlook outsource Paintings panic Paper Paper_Craft papercuts password password_manager PDF perfect_day perfect_posture Performance permaculture Personal_Development Personal_Finance personal_growth Personal_organization Personal_Promotion Personality Pets Philip_S Philosophy Photo_Booth photo_editing Photo_Sharing Photographer Photography Photography_Tip Photos Photoshop_Tutorials Physical_Performance PICS_for_Valerie Pictures Pilates Pizza plan Planner Planning planter plugins Podcast PodCenter Poems politics Politics_and_Homo Pomodoro_technique poor_posture Portfolio Portraits post-idea postage_rates Posture practice presence Presentations Press press_box pressure Print Privacy Procrastination Procrastination_buster Product_Reviews Productivity productivity_superstar productivity_tips Project Project_Management Pronomade_(s) public_domain public_records Puzzles Q&A Q&A_websites Query_letters Quick Quick_Look Quotations Radio rail Random Randomly Read_It_Later Reader_Questions reading reading_list real_estate reason_to_use_twitter Recipes recycling Reddit Reduce_Stress Religion Remake Remember_the_Milk Reminders repeat? Repurposing research Resources resume Resumés retrial reverse_graffiti reward Richard_Mosse richard_saul_wurman Roundups royalty_free Royksopp_video RSS RSS_advertising RSS_reader Rsync Russia SaaS salad Sand Saving Saving_Money Scanner Scheduling Sci/Tech Science Science_&_Math Screen_Captures Screenshots Search_Engine_Optimization search_engine_traffic search_tips security self_employed self_improvment seo SEO_Training Serveau_Francis Servers shoemoney Shopping Shortcuts Showcase Shows sign Site_News skills Skydive_Arena sleep Slideshows smart Smarterware SMS Snow_leopard Social social_bookmarking Social_Media Social_media_infographics Social_media_marketing social_media_marketing_tips Social_Network Social_Networking Social_Networks Social_Security social_superstar Social_Web socialnetworking Society Software_Apps Sonja_Lyubomirsky Sphinn spine spine_health springpad sql Ssn stairs star_wars startup startups Stationary statistics statue_of_liberty Stephan_Spencer Stephanie_Kubo Steve_Pavlina stock_photos stop-motion Storage strategy Street_Art stress_relief stretch_programings students Studio_Klass study StumbleUpon StumbleUpon_-_kreiling stylish subsidies Success Super-Charged_Links sustainability SYN_Feature_Enterprise synchronization Syncing Tabbed_browsing Tables tabs Tagging Tags task_management Task_manager techniques Technology Telephony Teleseminars Thanksgiving The_EG the_hive the_incredible_hulk The_Simpsons Thesis Think_Bigger_About_Your_Impact_Vision_And_Funding THIS_IS_THE_VERY_DEFINITION_OF_ADORABLE Thoughts tight_shoulder Time_management Time_Tracker Timer Tips Tips_&_Tricks to-do_list to-do_lists To_do_list To_Do_Managers Togetherness Toolbox tools tools_and_resources Top Top_Sites Top_Stories traffic tree Tricky_Two Trivia Tutorials tv Tweaks tweet TwiTip twitter twitter_tips typography Ubuntu uncat Uncategorized Unsolicited_Advice Unsorted_Bookmarks Upfront_Pay_Sites Upgrade Urban_&_Street_Art USA USB USB_Drives Useful_Code Useful_Resources User_styles Utilities Vacation Video Video_Demonstration Video_Editing video_editors Video_of_the_Day Video_Posts Videos vision Voice voting-page warren_buffett wealth_hack Web Web_2.0 web_application web_applications Web_Apps Web_browsers Web_clipping Web_Design Web_Designer Web_Designers web_development Web_Development_Tutorials Web_Resources web_tools webapp Webapps Webcam Webcams WebGL Weblog webmaster_tools website_analytics Wedding Weekend_project well-being Wellness Westix! which wickedpaedia Widgets Windows Winter Winterize WOM wood word_frequency Word_of_Mouth Word_Processor Wordpress WordPress_Developer WordPress_eBook WordPress_Theme_Developer Work Work-Life_Balance work_online Workflow Workplace Workspace Workspaces World_Domination Writing Writing_and_Blogging writing_business writing_career Writing_Content writing_income WYSIWYG Xbmc yale_endowment yard_waste YOUR_FACE_OMG Youth YouTube

Copy this bookmark:



description:


tags: