Categories
Fixing Stuff Samuel

Getting WordPress To Submit Emails From SES

Ok so by default wordpress seems to have a lot of issues sending contact forms, and all notifications when its installed on an EC2 instance.  The guide below is a quick reference on how to setup wordpress to use Amazon’s SES (simple email solution).

 

1.) download the SES plugin: https://wordpress.org/plugins/wp-ses/

2.) upload the files to your EC2 instance (or instances)

3.) login to wp admin and activate plugin config settings are “settings > wp ses”

4.) sender email must be validates in amazon SES prior to activating plugin
EC2 console > SES email sending service > verified senders > email addresses > verify a new email address

5.) create new IAM user and download access_key & secret key
EC2 console > IAM > users > create new > downlaod acces/secret keys > attach user policy > “amazon SES FUll Access”
*new “amazon ses full access” in order for plugin to work

open wp-config.php file and define any of the following that you want too:

// From mail (optionnal) must be an amazon SES validated email // hard coded email, leave empty or comment out to allow custom setting via panel define(‘WP_SES_FROM’,’me@….’);

// Return path for bounced emails (optionnal) // hard coded email, leave empty or comment out to allow custom setting via panel define(‘WP_SES_RETURNPATH’,’return@….’);

// ReplyTo (optionnal) – This will get the replies from the recipients. // hard coded email, or ‘headers’ for using the ‘replyto’ from the headers. // Leave empty or comment out to allow custom setting via panel define(‘WP_SES_REPLYTO’,’headers’);

// Hide list of verified emails (optionnal) define(‘WP_SES_HIDE_VERIFIED’,true);

// Hide SES Stats panel (optionnal) define(‘WP_SES_HIDE_STATS’,true);

Categories
Fixing Stuff Samuel

Fixing wordpress hard coded image links to work with S3

This is a follow up post to my earlier one about  setting wordpress to server images from amazon s3

 

Again please excuse the lack of polish on this, its mainly meant for my reference later.  Also shout out to my buddy Cool Brian for coming through with this little tweak:

To fix the auto trader theme from showing local image urls we altered the following file in wp-content/themes/autotrader-parent/offer-views/side-left.php

we made the following chagnes:

// alter image URL to use S3 bucket
$temp = parse_url($attachment->guid);
$new_url = “http://sprintervans.s3.amazonaws.com”.$temp[‘path’];

$slider_images[] = array(
‘id’            => $attachment->ID,
‘title’         => apply_filters(‘the_title’, $attachment->post_title),
‘order’         => $attachment->menu_order,
‘img_full’      => $new_url
);

Categories
Inspirational Samuel

Reminder To Myself

On days where I put my nutrition and fitness as the first priority ‘m happiest,  I am more productive & I seem to enjoy all aspects of life more.

Categories
Fixing Stuff Samuel

Serving Media/Image Files from Amazon S3

If you have been struggling to server your wordpress media/image files from Amazon S3 hopefully this basic explanation will help you out.  I apologize for the simplicity of this example, this post is mainly meant for my own use later so I have a record of how to set this up:

 

Download and manually install via FTP the following plugins

amazon web services plugin
amazon s3 cloudfront plugin

steps:
-install both plugins (upload manually, then activate in wp admin)
-create an IAM user on EC2, give user permissions of “AmazonS3FullAccess” (download the id Key and secret key, then add to wp-config.php)
-create an S3 bucket either through the AWS console, or select option in s3 plugin to create a new bucket
-check the first 3 options on the s3 plugin to
           -copy files to s3 as they are uploaded
           -point file urls to s3 once it has been copied to s3
           -remove uploaded file from local filesystem once uploaded to s3

 

Once completed any new media/images uploaded through the WP backend section will automatically be saved in your specified amazon S3 bucket

Categories
Inspirational Samuel

A Simple Request

Today I read a very simple request.  It came from a 5 year old boy who has terminal cancer.  His birthday is coming up on July 25th, and all he wanted was to get a letter in the mail.  You see when he initially got sick, a bunch of friends/family sent him get well soon cards.  When he got these cards his mother was really struck by how much he enjoyed seeing his name on all of the envelops.  So she told this story to her local news station and they ran a small story about the boy, asking viewers if they would write in to a P.O. Box where the mother could pick up letters and give them to her son.

I’m not sure exactly what struck me so much about this story, but upon reading it, it was all I could do to hold back tears.  I think I was really struck by the simple request, and probably more so by the simple joys of a small child.  I could really picture him running to the door to greet his mother who was carrying a huge pile of cards for him to read.  I could also really picture the gratitude that the mother would surely have, being able to make her son so happy.  I’ve written more about Simple Joys before, to me it really is the key to life.  To not take yourself too seriously, slow down and just appreciate how amazing life is.

Anyway my friends and I went out, purchased 3 cards and all wrote a simple happy birthday note to the Kid. His name is Danny.  It felt really good to do, and while I was mailing the card I realized it was probably one of the funnest things that I have done all year.  If you have a second I encourage you to mail a letter to Danny.

Danny Nickerson

P.O. Box 212 Foxboro, MA, 02035

Categories
Fixing Stuff Samuel

Batch Re-sizing images in photoshop

This is mainly just a reminder for myself on how to batch re-size images in photoshop. I don’t do this all that often so instead of struggeling every ~6 months when I need to do this I’m just going to write out the steps below:

 

1.) get all images you want to re-size into 1 folder

2.) open up photoshop and hit File > Scripts > Image Processor.

3.) select the folder with all images in it we made in step 1

4.) set the photo quality and hit the resize to fit option then input your W and H

5.) hit run and collect the images in the same folder as the origionals