Sending email screen shots from Enlightenment Linux


I read somewhere that its possible to take unattended screen shots (scrot) and mail it (heirloom-mailx) every one hour (/etc/cron.hourly). It was not easy particularly the mailing part because configuring any mail program to send mail from terminal to the outside world seemed a herculean task. The steps ..

$ sudo apt-get install scrot

$ sudo apt-get install heirloom-mailx

#  to install certutil in enlightenement

$ sudo apt-get install libss3-tools

# Create a certificate directory
$ mkdir .certs
 
# Create a new database in the certs dir
$ certutil -N -d .certs 
 
# Fetch the certificate from Gmail, saving in the text file GMAILCERT
echo -n | openssl s_client -connect smtp.gmail.com:465 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > GMAILCERT
 
# Import the new cert file into the new database in the new dir. enter password when prompted
$ certutil -A -n “Google Internet Authority” -t “C,,” -d .certs -i GMAILCERT 
 
# Double Check
$ certutil -L -d .certs

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
 
Google Internet Authority                                    C,,  
edit ~/..mailrc file
 account gmail {
 set smtp-use-starttls
 set ssl-verify=ignore
 set nss-config-dir=~/.certs
 set smtp=smtp://smtp.gmail.com:587
 set smtp-auth=yourusername@gmail.com
 set smtp-auth-user=you@gmail.com
 set smtp-auth-password=your_gmail_passwsord
 set from=”you@gmail.com
 }

Testing mail Config

 echo “Test Email” | mailx  -v -A gmail -s “test” testing@example.com

 

 

 

Advertisements

Using Google Transliterate API with YII


Using Google Transliterate API is straight forward. However to meet the goals of the small project (Webapp for food Catering company) I need to overcome following challenges.

Want to change id of text box (Tablename_fieldname) at will

Google text box id defaults to transliterateTextarea. I was not able to figure out how to change the YII $form object which enforces id of format Tablename_fieldname. I figured out its far more easier to change in the javascript of google to the id which YII requires.

 

change from

control.makeTransliteratable(['transliterateTextarea']);

to

var ids = ["Dish_dish", "Dish_dish2"]

control.makeTransliteratable(ids);

This brings us to the next challenge. I have to add one line for every field attribute I want to transliterate in the main site template page.

Load Google Transliterate API only in the views and not in every page

Google Apps Tips and Tricks


Forgot unique string

if you forgot the unique string Google generated for you at the time of your Google Apps setup. visit this url

Adding MX entries to Cpanel during setup.

  1. Log in to your cPanel account
  2. Click Mail
  3. Click Modify Mail Exchanger (MX Entry). A list of your current MX records will appear
  4. Click Change an MX Entry
  5. In the Change MX for… field, enter ASPMX.L.GOOGLE.COM
  6. Click Change.