From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: sending an email to an orgmode file? Date: Thu, 22 Dec 2016 11:21:13 +0100 Message-ID: <2016-12-22T11-12-06@devnull.Karl-Voit.at> References: Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cK0W5-0006SG-7j for emacs-orgmode@gnu.org; Thu, 22 Dec 2016 05:22:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cK0W1-0001KT-62 for emacs-orgmode@gnu.org; Thu, 22 Dec 2016 05:22:29 -0500 Received: from [195.159.176.226] (port=49630 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cK0W0-0001JM-VS for emacs-orgmode@gnu.org; Thu, 22 Dec 2016 05:22:25 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cK0Vt-0004za-Cs for emacs-orgmode@gnu.org; Thu, 22 Dec 2016 11:22:17 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org In case you do have access to your mail server: * Xebar Saram wrote: > > im looking for a simple solution that will allow me to send an email from > my mobile phone and habr that email either be appended to a txt(org) file > or perhaps another solution to get my mobile on the go notes onto my laptop > orgmode file. i tried orgzly and mobile org but i would prefer a simple > solution as to send an email Since I do not use an Emacs-based mail setup, I created a workaround by bouncing relevant emails to a special email address I use for forwarding emails to Org-mode. I am maintaining my own email server and I am using procmail[1] to filter/preprocess emails. When an email is found to that specific email address the following rule applies: ,---- | :0 | * ^(Resent-To|X-Original-To|To|Bcc|Cc): orgmode@MY-DOMAIN.AT | { | :0 | |/home/karl/src/vk-add-email-to-org.sh | } `---- With the script: ,----[ vk-add-email-to-org.sh ] | #!/bin/sh | | ## generates an org-file-entry from the email sent through stdin | | ORGFILE="/home/karl/org/inbox.org" | | ## build email by adding input from stdin line by line: | while IFS= read -r line | do | email="${email} | ${line}" | done | | subject=`echo "${email}"|formail -x "Subject"` | header=`echo "${email}"|formail -X "From" -X "Subject" -X "Date" -X "Message-ID" -X "To"` | body=`echo "${email}"| sed -e '1,/^$/ d'` | | echo "* TODO Email:"${subject} >> ${ORGFILE} | echo >> ${ORGFILE} | echo "#+BEGIN_QUOTE" >> ${ORGFILE} | echo "${header}" >> ${ORGFILE} | echo "#+END_QUOTE" >> ${ORGFILE} | echo >> ${ORGFILE} `---- Refiling from my inbox.org is the same process as refiling my input from MobileOrg. HTH [1] Please start with mailfilter instead if you do a fresh start. -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github