Results 1 to 5 of 5
Hi guys,
I have been asked from a company to create a mechanism to send a text message (sms) when a email is sent to an internal email address (like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-30-2012 #1Just Joined!
- Join Date
- Aug 2012
- Posts
- 3
Convert emails into textfiles
Hi guys,
I have been asked from a company to create a mechanism to send a text message (sms) when a email is sent to an internal email address (like "smsalert at mycompany dot com).
In order to do it, I needed a text-based email client to convert the email into a plain text file. Then I need an application to read the file and send it to a 3G dongle.
I can't find a good solution to read the emails via command line. I've tried "mutt" but it is badly documented and I can't get how to run a macro.
Any idea?
Thanks,
Dario
- 08-30-2012 #2Just Joined!
- Join Date
- May 2012
- Location
- Tampere, Finland
- Posts
- 21
Depends on protocol and security. And where the mailbox is located.
Remote imap mailbox is easy to read via normal tcp-socket on any programming language.
Local mailservers store mails differently. If its a file, you just read the file. Some use databases, if unencrypted, you just read the database.
Just some ideas I thought i'd throw there without knowing more spesifics.
- 08-30-2012 #3Just Joined!
- Join Date
- Aug 2012
- Posts
- 3
Hi Gjordis,
I have to interface with a local MS Exchange server so fortunately I have not any security concern. Unfortunately Exchange runs only on Windows so I have somehow to read the emails via IMAP. Just I have to find the right application to connect from Debian, read the body message and save it to local file (on Debian).
Any idea?
Thanks,
Dario
- 08-30-2012 #4Just Joined!
- Join Date
- May 2012
- Location
- Tampere, Finland
- Posts
- 21
Well the operation is simple and very custom, so i would simply make a Python/C++/C/Java/*choose language* , which retrieves the mails of that box with imap via normal TCP socket. Imap protocol message-tables can be found allover the web.
Most email clients have UIs and too much functionality for this task, so a custom application would be my choice.
If you want to create this "mechanism" without doing any programming, it can be very tricky.
- 08-31-2012 #5Just Joined!
- Join Date
- Aug 2012
- Posts
- 3
Done via PHP. Thanks guys


Reply With Quote

