![]() |
mailcmd - send email from commandline
http://maemo.org/packages/view/mailcmd/
Hi, this is a simple command line utility to send emails. It uses your default email account from your email applications (modest). To send an email just enter the email subject, receiver address(es) and type in your message (finish up with ctrl+d). Examples: mailcmd -s subject recipients your message or echo "your message" | mailcmd recipients If you have configured modest for autoupdate, the message is sent the next time you are online. Otherwise it stays in your outgoing folder until you push "send/receive" (in modest). nicolai |
Re: mailcmd - send email from commandline
Wonder if this can be achieved with a script and telnet to smtp port (25?), would also allow you to send as bill.gates@microsoft.com, sent yesterday if you find a server that doesn't require encryption (good old times).
|
Re: mailcmd - send email from commandline
I would prefer to send one as elop@nokia.com with subject release the N950 worldwide
|
Re: mailcmd - send email from commandline
Elop/BG, not much difference. You could send as obama@whitehouse.gov (there are websites that still allow you to do it, one of the funny things to do with telnet years ago, now most servers require authentication/encryption).
obama@whitehouse.gov wrote: Stephen for god's in which we trust sake: release the N950 now! |
Re: mailcmd - send email from commandline
New version (0.02)
- finds default email account, even if they contain whitespaces (like "Mail for Exchange") - add an option "-a" for attachments (echo "message" | mailcmd -a /fullpath/to/file -s subject adress(es) nicolai |
Re: mailcmd - send email from commandline
I don't why, but mailcmd is giving me "segmentation fault" when i try to use it.
This is the command i'm using: echo "test" | mailcmd myemail@gmail.com |
Re: mailcmd - send email from commandline
works for me.
Do you have a mail account defined? |
Re: mailcmd - send email from commandline
yes of course - it also worked the last time i used it ~a week ago and this started happening for some reason
|
Re: mailcmd - send email from commandline
i just tried to run the same command from an SSH client (my pc) and it worked fine!
the segmentation issue only happens if i run it from x-term on the device itself - strange |
Re: mailcmd - send email from commandline
is it possible to send multiple attachment?
I can send with one but not more than that |
Re: mailcmd - send email from commandline
last i tried, there was a difference if one ran it as root or as user user.
also, might need run-standalone.sh? cant remember but it was trivial (tho it seg faulted) so i ignored it. but issue lies around there last i recall. kh |
Re: mailcmd - send email from commandline
1 Attachment(s)
It now supports multiple "-a FILE" commandline arguments
for attachments. And think I found the reason why it segfaults sometimes. Attached the new version 0.0.5-debfile (garage and/or autobuilder is down) |
Re: mailcmd - send email from commandline
When installing I get
Code:
Package mailcmd: File '/usr/bin/mailcmd' not in digsigsums -- warning |
Re: mailcmd - send email from commandline
I had no problems installing the deb file.
From commandline and with the application manager. Where did you get that message? And it works without segfaulting. Do you have an email-account in modest, and what was the exact command? regards Nicolai |
Re: mailcmd - send email from commandline
Smells like an N9 message.. this is for a N900 :p
|
Re: mailcmd - send email from commandline
Indeed it is, and how wrong I was ;) Couldn't this be ported to the N9 by some kind soul...?
Thanks! Edit: Installed beautifully on the N900 :p |
Re: mailcmd - send email from commandline
Where I can find full manpage of this?
I have like 4 accounts configured in modest is there an option to select an account to send from? Also, probably more related to general terminal but how to go one line back and/or delete a line if you spotted a mistake or pressed enter too much :P Other than that it is working totally fine, and have not experienced a segfault yet. |
Re: mailcmd - send email from commandline
Quote:
Quote:
Quote:
your text send it with mailcmd: cat textfile | mailcmd .... Quote:
Nicolai |
Re: mailcmd - send email from commandline
Quote:
Quote:
Quote:
|
Re: mailcmd - send email from commandline
Quote:
seq 1 10 | vim - .. inside vim, pres Esc & type following: :w !sed -e 's/^/MailLine/' In actual, you'd actually only run vim without a filename, type the mail content, press Esc, and type :w !mailcmd someone@somewhere.com. More info here: http://www.softpanorama.org/Editors/...m_piping.shtml kh |
Re: mailcmd - send email from commandline
I love mailcmd - thank you so much for building it!
It's exactly what I needed to let my N900 work as a neat home agent in the background. It's stting on my bedside table as an alarm clock and internet radio while downloading torrents. Since I want it to run on battery every now and then to keep the battery trained I wrote some scripts and have them read the battery state periodically with fcrontab. E-mailing them periodically (also with fcrontab) from the N900 gives me the the kick I need as the control freak I became quenching every little possibility out of that awesome little device. "Hi, it's your N900. The current battery state is 17%. You should charge me soon or I cannot wake you up tomorrow." :) Spaß beiseite. I managed to attach the battery report to the e-mails as a textfile. Which, I must say, cost me HOURS at several nights and as only a part-time nerd I'm a little proud of ;). But of course you always want more. Why? Because SOMEHOW IT MUST BE POSSIBLE!". The thing is that in the periodically received mails I still have to open the attachment to see the report. Which is a little unpractical. And now my question - is it possible to write pieces of a textfile into the subject field of the e-mail? Then you saw the battery state without opening the mail! The battery report is of course only one example of what you could be mailing. Running processes, camera pictures, internet connection, disk space and torrent reports would also be nice... |
Re: mailcmd - send email from commandline
I've started to use an alternative solution. The pipe before the command can be used to put any kind of output into the e-mail. Many e-mail clients display the beginning of the mail already in their overview of the inbox. This can be used to conveniently view status messages sent by mailcmd.
Still wondering how you can put one into the subject field, though... Cheers! |
All times are GMT. The time now is 08:04. |
vBulletin® Version 3.8.8