PDA

View Full Version : Cheapest solution to send an email?



SRLM
12-11-2009, 04:33 PM
I am looking for some sort of module that will allow me to send an email via serial commands. Something like "email:user@domain.com content:"Hello World!" would be ideal. Of course, it should also be cheap since it will be incorporated into a design that I will make for a number of friends, and we are all students. The module doesn't have (and preferably doesn't) to have a web server feature.

I suspect that a standalone propeller can do it, and that is fine if the code isn't too complicated. I don't want to have to learn (yet) the whole foundation protocols of the internet. There are also a number of chips and modules like the Prop NIC from Spin Studio (http://ucontroller.com/documentation/PropNICDoc.html), but that is $30.

So, any cheap and simple solutions to send an email from serial commands?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm

Phil Pilgrim (PhiPi)
12-11-2009, 04:50 PM
You already have a PC. Would a program running on that, in conjunction with a serial port, work?

-Phil

Tubular
12-11-2009, 05:07 PM
I seem to remember mail servers have quite a simple "texty" command interface. You can probably telnet to your existing mail server and have a looksee.

Of course going that path would still require an internet connection, but you could use a serial based dial up connection (this would be dirt cheap except for the call costs, but assumes you have phone line access)

Another approach is to use a wireless GSM modem. I've used the Telit modules which have a script for sending the email across to the net. They're not that cheap, $50ish. Jay Kickliter was doing something interesting on this forum with cheap motorola cellphones... not sure if SMS or Email, but you can easily bridge from one to other.

VIRAND
12-11-2009, 06:24 PM
Before broadband it used to be easy, you could program in BASIC to send strings to a modem
like ADTD 555-1212 (but that is a wrong number) and wait for receiving a login string and
then send your email name and password
and then use your choice of email programs. The last server I knew of that I could do that on was
sdf.lonestar.org, which was a free personal server, and might still exist, but if not, you could
make your own on a linux box. I haven't done that though. It should also be possible and easy
and faster on Propeller and the ethernet module, just look up SMTP protocol and it should be as easy as
with the dialup modem and automatic login string handling in Spin.

But you'll need an ISP or web host service in any case. Your own internet access provider or
coffee shop is not going to let you send spam from email addresses that aren't yours or theirs,
unless they are so bad that they don't mind being blocked as spammers by most other ISPs.

Maybe I'm answering the wrong question. If you get the ethernet module and Spin web server demo,
you can permit sending email with the HTML "mailto:name@domain.com" feature. Also I imagine it
would require a lot of parsing but you could use Spin to generate the dynamic HTML needed to
have an email like service even without a domain name which might be like just texting on a
website from user to user, or a BBS, or like a facebook wall.

If you want to give all your friends your own version of email like google, aol, hotmail, then you
buy a domain name with a web hosting service that has a nice basic package with a lot of email boxes
for maybe less than $10 a month, like AllYourFriendsNames@SRLM.NET . Since it is a web host
you could use the website for social networking with a free sofware HTML editor like NVU, with the benefit
of not being OWNED by facebook and the disadvantage of it not being so dumbed down, or as a blog without
any software. You don't need a web page but the 404 might be embarrassing if someone tries to browse
your domain. Often the email service options are Webmail, much like google and hotmail, or "POP" which is
the protocol that is probably how Outlook express or Thunderbird gets your mail. Again, the Propeller can
send SMTP messages to the host server to forward to EITHER your friends old email addresses OR the
POP or WEBmail boxes provided by the host. For anything special, you'd have to find out how to write
server-side applications and make sure the host can and will accept them. By special I don't mean
sending email by Propeller (which might as well be a PC) but if you have a totally innovative way of
doing email that your ISP doesn't already do, for example by using voice recognition over the phone
to send email without typing it. BY THE SIZE OF THIS PARAGRAPH I'LL ASSUME THAT IT IS FULL OF
OLD AND UNNECESSARILY COMPLICATED STEPS AND SOMEONE HAS NEWER BETTER EASIER IDEAS.
I also would assume that otherwise most people know how to make web pages and get email accounts,
so I must be answering the wrong question again and someone else will have a better answer that
is more focused on sending email from the Propeller in a simple easy modern way.

I imagine that that may involve a Propeller as a mail server , but it still needs DNS and a domain name,
which can be obtained apart from a host for less than $10 a YEAR (vs hosting which is billed similarly on a
Monthly basis but I believe it is likely possible that the Propeller can host for free if all your friends
email can fit on an SD card). But lets see what new ideas others have and how bizarre my ideas are.

If you're all on a campus with wi-fi everywhere and you don't need NEW email addresses then you just
send SMTP protocol from the Propeller using your existing local email addresses as a laptop would, using
whatever Propeller wifi module which I heard (a rumor) was available.

Post Edited (VIRAND) : 12/11/2009 10:35:49 AM GMT

Oldbitcollector (Jeff)
12-11-2009, 10:45 PM
You can send an email with a simple telnet session which Harrison's driver supports.
Should be a simple trick to send & even receive an email with a Propeller and
PropNIC type configuration.

Here is a link to sending an email with a telnet type session. There is also a link
to reading an email this way as well.

www.wikihow.com/Send-Email-Using-Telnet (http://www.wikihow.com/Send-Email-Using-Telnet)

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

stevenmess2004
12-12-2009, 07:55 AM
There is an object in the obex that recieves emails using pop3. You may be able to get that to send emails. obex.parallax.com/objects/259/ (http://obex.parallax.com/objects/259/)

SRLM
12-12-2009, 03:47 PM
Thanks everyone for the replies. I will address them one at a time:


PhiPi said...
You already have a PC. Would a program running on that, in conjunction with a serial port, work?


Unfortunately, no. I happen to have three computers running in my room, but others don't. The system needs to be able to send an email regardless of where a computer is.


Tubular said...
I seem to remember mail servers have quite a simple "texty" command interface. You can probably telnet to your existing mail server and have a looksee.


I have already tried to log into our mail server with a text interface (via a PC). It says it requires a telnet session, but when I try that it denies me. Either my internet protocol knowledge is lacking or it isn't possible.


VIRAND said...
If you're all on a campus with wi-fi everywhere and you don't need NEW email addresses then you just
send SMTP protocol from the Propeller using your existing local email addresses as a laptop would, using
whatever Propeller wifi module which I heard (a rumor) was available.


Everyone has a spare Ethernet port on the network that the module can be connected to. Since the project doesn't need to be mobile it's okay to keep it permanently plugged in.


OBC said...
You can send an email with a simple telnet session which Harrison's driver supports.
Should be a simple trick to send & even receive an email with a Propeller and
PropNIC type configuration.


With my utter lack of internet skills I can't get it to work just using a PC. I have tried on both my school email and personal email, and neither wants to cooperate. Mostly they just show a blank screen. I tried both CMD telnet and PuTTY.

This is turning out to be more difficult than I thought... BTW, outgoing mail doesn't have to be from any particular domain name or email address. It just has to go somewhere since it's for a notification scheme.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm

BradC
12-12-2009, 03:49 PM
SRLM said...

I have already tried to log into our mail server with a text interface (via a PC). It says it requires a telnet session, but when I try that it denies me. Either my internet protocol knowledge is lacking or it isn't possible.



Stupid question, but you were actually trying to connect to port 25 weren't you?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.

BradC
12-12-2009, 03:56 PM
brad@bklaptop2:~$ telnet mail.fnarfbargle.com 25
Trying 93.93.128.63...
Connected to mail.fnarfbargle.com.
Escape character is '^]'.
220 fnarfbargle.com ESMTP Exim 4.69 Sat, 12 Dec 2009 07:55:06 +0000
MAIL FROM:testuser@fredbasset.net
250 OK
RCPT TO:dispose1@fnarfbargle.com
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
This is an email spanning
Multiple lines that will appear in my inbox shortly
.
250 OK id=1NJMpK-0000IO-88
^]quit







Received: by bkcuk001 (mbox brad)
(with Cubic Circle's cucipop (v1.31 1998/05/13) Sat Dec 12 07:57:23 2009)
X-From_: testuser@fredbasset.net Sat Dec 12 07:56:00 2009
Return-path: <testuser@fredbasset.net>
Envelope-to: dispose1@fnarfbargle.com
Delivery-date: Sat, 12 Dec 2009 07:56:00 +0000
Received: from xxxxxxxxxxxxxxxxx ([xxx.xxx.xxx.xxx] ident=xxxxxxxx)
by fnarfbargle.com with smtp (Exim 4.69)
(envelope-from <testuser@fredbasset.net>)
id 1NJMpK-0000IO-88
for dispose1@fnarfbargle.com; Sat, 12 Dec 2009 07:56:00 +0000

This is an email spanning
Multiple lines that will appear in my inbox shortly

.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.

kaffer
01-03-2010, 09:15 AM
SRLM,

if I get it right, you and your friends wants to send to each other some notification msgs. If it is that so, you could just write your own protocol. If you have propellerdevices all/time powered, and you know their IP addresses, than the simpliest is to interconnect them with API_Telnet serial object via IP protocol - you don't have to dig into it, just use that object as opening a serial port to a known IP address.

Email sending with Prop is a bit complicated, since modern smtp servers use secured connections to eliminate the usage of them for spamming.

But if I were you I would use PropIRC and a known IRC server with a personalized chatroom or channel, and than you only have to solder the boards, download Propirc into them and there you go...

Phil Pilgrim (PhiPi)
01-03-2010, 09:50 AM
You could connect the Prop to a plug computer (http://www.marvell.com/products/embedded_processors/kirkwood/plugcomputer.jsp) via the USB port, then use a script running on the plug computer to do the emailing and ethernet stuff. To me, this is an almost ideal division of labor, rather than shoehorning the network stuff into the Prop.

-Phil

SamMishal
01-03-2010, 11:26 AM
BradC said...If you always do what you always did, you always get what you always got.
Hi Brad,

I always like to read your signature line....quite amusing.

My comment on this one is "Not necessarily"..... http://forums.parallax.com/images/smilies/lol.gif




▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Samuel

www.RobotBASIC.com (http://www.RobotBASIC.com)

rjo_
01-03-2010, 02:26 PM
Cheapest?

This probably isn't the cheapest... but in the long run it might be the best investment of your time, effort and money. And it is definitely fun stuff.

I had this working at one point, so I know it is possible. I was using it to e-mail gps coordinates from my car, using a GE862. Get a GE865... with a breakout board, 865 included, is $99. It has a tiny footprint, is cheaper than the 862 and doesn't have the GPS unit.

http://www.sparkfun.com/commerce/product_info.php?products_id=9297

The 865 speaks serial... two wires from your Prop is all you need. No voltage leveling problem... just hook the wires up:) Rx out of the board goes to your prop's rx line.
You can even power it up from 3.3V.

Once you are connected... you send the right series of AT commands and things will work just the way they are advertised.

Don't bother with the built in Python programming environment of the GE865... it is a quagmire. But there are a couple of forums that provide python sources... which are easy to hack... since you are just extracting AT command sequences.

With the Prop there is no muss and no fuss... When you are done developing, you won't have to have a connection to a computer. It will work anywhere. What could be better?

You have to add a Sim card adapter... $14.

Phil has posted a solution for using the audio transmit and receive lines to send serial over the phone... so you might want to buy two of the GE865s.

Rich

Drone
01-03-2010, 03:24 PM
Umm... just use an Xport or WIZnet ethernet/UART module and mimic a telnet smtp session on port 25 with one of the serial objects on the Object Exchange.

This ethernet/UART module is $24.95 qty.-1:

www.sparkfun.com/commerce/product_info.php?products_id=9472 (http://www.sparkfun.com/commerce/product_info.php?products_id=9472)

How to test SMTP via telnet (google for many more examples):

support.microsoft.com/kb/153119 (http://support.microsoft.com/kb/153119)

Rgds, David

Harrison.
01-03-2010, 05:14 PM
Drone said...
This ethernet/UART module is $24.95 qty.-1:

www.sparkfun.com/commerce/product_info.php?products_id=9472 (http://www.sparkfun.com/commerce/product_info.php?products_id=9472)
Unfortunately that specific module is not a simple UART (async serial) module. It requires a bit of software to get TCP/UDP socket access, which is performed via SPI or memory mapped parallel I/O. Wiznet does have a serial<->ethernet module for $5 more (www.sparkfun.com/commerce/product_info.php?products_id=9476 (http://www.sparkfun.com/commerce/product_info.php?products_id=9476)). I haven't used the serial module so I don't know if it will work for your purposes or not.


SRLM said...
I am looking for some sort of module that will allow me to send an email via serial commands. Something like "email:user@domain.com content:"Hello World!" would be ideal. Of course, it should also be cheap since it will be incorporated into a design that I will make for a number of friends, and we are all students. The module doesn't have (and preferably doesn't) to have a web server feature.
I wouldn't really look too much into plain text SMTP over port 25. Most ISPs require SSL for SMTP and POP3/IMAP access for security and anti-spam reasons. A much better solution would be to have a remote server (a cheap webhost for example) that hosts a HTTP accessible script that will proxy your emails. That way the actual email sending is handled remotely, and all your Propeller device will have to do is send a HTTP GET or POST request to the webserver of your choice. I use this technique for many projects.

SRLM said...
There are also a number of chips and modules like the Prop NIC from Spin Studio (http://ucontroller.com/documentation/PropNICDoc.html), but that is $30.
As for hardware, the cheapest solution would be to use an ENC28J60 ethernet controller ($3 for the chip + $4 for the ethernet magnetics). You could also use one of the various Wiznet hardwired TCP/IP chips, which cost a little more than the ENC28J60 solution. Whichever route you choose, stay away from expensive breakout boards. The actual cost to build one of these interfaces from scratch is less than $10.

Disclaimer (and shameless plug...): I'm a bit biased towards the ENC28J60 as I have used it in many projects. I even have a custom TCP/IP stack for the Propeller that targets it: harrisonpham.com/dp/proptcp (http://harrisonpham.com/dp/proptcp).

Drone
01-03-2010, 06:28 PM
Hi Harrison, You're probably right about the WIZnet module. But the module you point out is true RS-232. So for direct interface with the prop, you would have to bypass what looks like an on-module FTDI chip.

Good suggestion regarding the external server. I do this as well. I also use server side include information for determining the dynamic IP address of the remote device which can be served to other remotes by the off-site server which has a registered domain.

At least where I live, most ISP's still support port 25 SMTP/POP without SSL provided you're connected on the inside of their network (via a DOCSIS cable modem for-example). SSL connections are only required when accessing email from the outside.

Regards, David