Connect with us

Send Mail from Command Line?

Discussion in 'Electronic Design' started by Jim Thompson, May 28, 2007.

Scroll to continue with content
  1. Jim Thompson

    Jim Thompson Guest

    Anyone know of a good program that can send E-mail from the Command
    Line? ...Send a filename to an address?

    All I've found don't accommodate a password. I guess the authors
    assume you are resident with the SMTP server.

    ...Jim Thompson
     
  2. Jamie

    Jamie Guest

    Well, I do programming and yes, I can code a smtp mail program
    to run on a command line how ever, it still requires a
    user name and password to send.
    There is information stored in the registry that helps you with
    this how ever, not every uses Outlook since it is very week.

    In any case, if you can supply this info then it would be
    easy to encode that on the command line.
    something like.
    sendmail
    <username>,<password>,<To>,<From>,<subject>,<textBody.txt>,<attachments.exe+>.....
     
  3. Jim Thompson

    Jim Thompson Guest

    I have a son who can do that, and he can spell correctly ;-)

    I was just looking for an off-the-shelf product.

    ...Jim Thompson
     
  4. This sounds like it would work..... http://www.blat.net/

    Cheers
     

  5. This is a simple program that seems to work okay. If your smtp server
    requires authentication it might bother you that the password is
    stored in plaintext in the ini file.

    http://www.indigostar.com/sendmail.htm

    Free trial version for download.


    Best regards,
    Spehro Pefhany
     
  6. IanM

    IanM Guest

    Hi Jim,

    look for a command line program that uses MAPI to make Eudora send mail.

    I have one that complemented something I do a lot

    pkzip ddmmyy.zip somefiles
    cemail ddmmyy.zip [email protected]_somewhere_.com

    nowadays I tend to use winzip and then winzip's Mail Archive menu item, this
    also uses MAPI to drive your own email client.

    regards,

    Ian
     
  7. blat is the program of choice (www.blat.net). It takes passwords for
    different types of logins, sends attachments, etc.

    And it's free. Only problem is the latest version (2.6.2) has a bug in
    which, if you run it from a scheduled task while the user is not logged on,
    it doesn't work. Version 2.6.1 has no problem that I ever saw, and I run it
    every day on a dozen PCs and servers.
     
  8. Well, most are and chances are you are, too :)

    Windows from 2k on and Linux come with an SMTP server.

    Gerhard
     
  9. Jim Thompson

    Jim Thompson Guest

    To send outside of my local network I need to login to my ISP's
    server, or an independent server such as GoDaddy (which I use).

    ...Jim Thompson
     
  10. John Larkin

    John Larkin Guest


    The Windows versions of PowerBasic (PBCC being the simplest one) have
    all the hooks you need to send and receive email. You could do what
    you want with maybe a 30-line program. C'mon Jim, learn how to
    program!

    John
     
  11. Jim Thompson

    Jim Thompson Guest

    Hi Spehro, I need to set PORT number other than standard, but can
    find nothing in the manual for how to set port.

    ...Jim Thompson
     
  12. Jim Thompson

    Jim Thompson Guest

    Nothing in manual, but added line is INI file "Port=wxyz", then it
    works.

    ...Jim Thompson
     
  13. Jim Thompson

    Jim Thompson Guest

    I got it working by adding a "PORT=" line in the INI file.

    Now I have all my bells and whistles working for E-mail redirection to
    my cell phone. Text message beeps me to login and check my E-mail ;-)

    ...Jim Thompson
     
  14. I don't see that option either. Hmm.. looks like a residential
    address.


    Best regards,
    Spehro Pefhany
     
  15. I see you got your problem solved already, but just out of curiosity... If
    you can connect with SMTP to GoDaddy (I assume this means that your ISP
    lets port 25 through), why can't you have a local SMTP server do the
    delivery?

    Gerhard
     
  16. Jim Thompson

    Jim Thompson Guest

    My ISP (Cox) DOES NOT allow connections to other servers via Port 25,
    or to Cox' servers from non-Cox origination points.

    So I connect to GoDaddy's SMTP relay via another port.

    The big advantage is that I can access GoDaddy from anywhere.

    ...Jim Thompson
     
  17. Agreed. For command line use, I just use Perl to do what Jim seems to
    be talking about. It's very easy to code up, using a free library,
    and Parl is pretty easy to use with lists, if desired. No compilation
    of the code required and probably fewer lines than 30, too.

    Jon
     
  18. Joerg

    Joerg Guest

    Mine doesn't either. So, I use port 587 and it worketh just fine ;-)
     
  19. krw

    krw Guest

    Adelphia, oops Comcast, servers don't either. The ATT business
    Internet POP servers allow access from outside the AT&T network
    though. I have Individual.net for Usenet because I can get to their
    servers from either (or work, back when that mattered;).
     
  20. Joerg

    Joerg Guest

    I have AT&T, formerly SBC. Roughly a couple years ago they blocked port
    25. Of course out of the blue without prior warning. So I switched it to
    the alternative port.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-