Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old November 4th, 2007   #1
brcre
5 Cups of Ubuntu
 
Join Date: Feb 2006
Location: Nampa, ID
Beans: 26
Ubuntu 9.10 Karmic Koala
Send a message via AIM to brcre Send a message via Yahoo to brcre
Evolution at the command line

evolution mailto:joe@somewhere.net
Starts Evolution and begins composing a message to the e-mail address listed.
I was curious if there is a way to send a message auto created in an Evolution GUI?

Code:
evolution mailto:person@att.net?subject=Test\&body=Some%20crazy%20story%20stuff
Next step will be to send the message that we created:
%11%0D = ctrl return -> Doesn't work still looking for the correct solution

%20 = space
%0D%0A = line breaks
%0A = a line break in your message body (the middle one is a zero, nut o as in opera)
\&attach="/path/to/file" If you want more attachments just keep adding

Here is a solution that I was attempting with the train of thought shown above, however that seems to be a dead end since it never completely sends the message. Below does:

Using your favorite text editor copy and paste this in there. Then change the generic information to your information as required. Once it is saved chmod 755 the file and set up a cron job or script to execute this file as needed. It was tested on Ubuntu 9.04 - the Jaunty Jackalope with Evolution.
Code:
#!/bin/bash
date '+From username@gmail.com %a %b %e %T %Y'   > /tmp/autoemail
echo "Subject: Auto_Create_Email" >> /tmp/autoemail
echo "From: A_User <username@gmail.com>" >> /tmp/autoemail
echo "To: Sent_To_Person@gmail.com, 2nd_Person@micron.com" >> /tmp/autoemail
echo "">> /tmp/autoemail
echo "This message was autocreated" >> /tmp/autoemail
echo "2nd Line" >> /tmp/autoemail
echo "">> /tmp/autoemail
cat /tmp/autoemail >> /home/user/.evolution/mail/local/Outbox
rm -f /tmp/autoemail
exit 0

Last edited by brcre; July 23rd, 2009 at 09:58 PM.. Reason: Simplified
brcre is offline   Reply With Quote
Old November 4th, 2007   #2
brcre
5 Cups of Ubuntu
 
Join Date: Feb 2006
Location: Nampa, ID
Beans: 26
Ubuntu 9.10 Karmic Koala
Send a message via AIM to brcre Send a message via Yahoo to brcre
Sync Palm Z22 with Evolution: Running Gutsy 7.10

Sync Palm Z22 with Evolution: Running Gutsy 7.10
verified this still works with: Jaunty Jackalope 9.04 (10/15/2009)
1. Check which Kernel version you're running
uname -r
*2.6.22-14-generic 6.22 has something wrong with it and won't find the Palm device. If you are running this you'll need to change your Kernel
2. sudo vi /etc/udev/rules.d/10-custom.rules I found to be unnecessary. Also if you've tried this step a few times you might want to remove all the entries you've added at: /etc/udev/rules.d
*BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
*BUS=="usb", SYSFS{product}=="Palm Handheld*", KERNEL=="ttyUSB[13579]", NAME="pilot", GROUP="uucp", MODE="0660"
3. sudo vi /etc/modules
After the last line add
visor
4. sudo modprobe visor
5. Now go to evolution
*Choose Menu items: Edit/Synchronization Options
6. Plug in the Palm device to the USB cable and press HotSync

The only problem I've had with this is that I get endless amounts of Palm Screens if I leave it plugged in. So as soon as I'm doing I get it unplugged.
To check if your connection is working try:
ls -l /dev/ttyUSB* or
ls -l /dev/pilo*
Something must show up if the rule is working.

under gnome-pilot settings:
PDAs tab:
Name: Brent_Pilot
ID: 23574
Ownder: Brent
*I got these setting by clicking on the Get From PDA button. Then I changed the device name and the file path at the bottom of this screen.
Brent_Pilot
/home/brcre/Brent_Pilot

Devices tab:
Cradle USB

Conduits Tab:
Backup Enabled
EAddress Synchronize
ECalendar Synchronize
EMemos Synchronize
EToDo Synchronize
Everything else listed is Disabled

If you find that after syncing the device once it won't work after that try:
System/Administration/System Monitor
find gpilotd in the Processes tab and End Process
Otherwise you can log out and back in if you don't have the remember current session selected at: System/Preferences/Sessions/Session Options
Else reboot your system.

Last edited by brcre; October 15th, 2009 at 04:56 PM.. Reason: Changed the topic
brcre is offline   Reply With Quote
Old November 4th, 2007   #3
brcre
5 Cups of Ubuntu
 
Join Date: Feb 2006
Location: Nampa, ID
Beans: 26
Ubuntu 9.10 Karmic Koala
Send a message via AIM to brcre Send a message via Yahoo to brcre
Automatically send email messages

To Send Mail Automatically
This worked for Feisty Fawn but after upgrading to Gutsy Gibbon it doesn't. Now at Ubuntu 9.04 - the Jaunty Jackalope it does:
The example given works with gmail accounts.

Synaptic Package Manager: ssmtp
cd /etc/ssmtp
Code:
sudo vi ssmtp.conf
root=user_name@gmail.com
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=user_name
AuthPass=mail_password
rewriteDomain=gmail.com
FromLineOverride=YES
hostname=hostname can be discovered with
Code:
hostname -f
(:wq - to save and exit)
Code:
mail -s "Test" Going_To@hotmail.com
Testing Mail...
.
CC:
now the cron can be set up and the programs written can have email abilities.

Last edited by brcre; July 16th, 2009 at 04:29 PM.. Reason: Updated Instructions
brcre is offline   Reply With Quote
Old November 5th, 2007   #4
brcre
5 Cups of Ubuntu
 
Join Date: Feb 2006
Location: Nampa, ID
Beans: 26
Ubuntu 9.10 Karmic Koala
Send a message via AIM to brcre Send a message via Yahoo to brcre
search -- Used to search for a file name or matching parts of a name

Search Assistant
Code:
#!/bin/bash 
# name of the script 'l'   just the letter l

# a little bit of help in case of misuse 
if [ $# -lt 2 ] 
    then 
       echo "usage: l /directory pattern" 
       echo "example: l /etc config" 
       return 1
       exit 
fi

# $DIR is the first argument, the path to the directory 
DIR=$1

# $SEARCH is what you are looking for, and it's the second argument 
SEARCH=$2

# $RED sets the text to inverted red, changing the capabilities of the terminal via terminfo parameters 
# setaf 1 = red, smso = inverted 
RED=`tput setaf 1; tput smso`

#  $NORMAL returns text to normal attributes 
NORMAL=`tput sgr0`

# 
ls -1 $DIR | sed s/"$SEARCH"/"$RED$SEARCH$NORMAL"/ | grep $SEARCH | sort -u

Last edited by brcre; November 8th, 2008 at 01:10 PM.. Reason: Changed the topic
brcre is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:30 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry