Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #40928

Re: send email and socket programming

From Chris Vine <chris@cvine--nospam--.freeserve.co.uk>
Newsgroups comp.lang.c++
Subject Re: send email and socket programming
Date 2016-02-14 23:01 +0000
Organization Datemas.de http://www.news.datemas.de
Message-ID <20160214230131.458a02a6@bother.homenet> (permalink)
References (2 earlier) <n9qkig$16ln$1@gioia.aioe.org> <UYmdnfhb8L0zfl3LnZ2dnUU78WmdnZ2d@giganews.com> <n9qshj$1kv4$1@gioia.aioe.org> <wcOdna2fwNPuYV3LnZ2dnUU78LOdnZ2d@giganews.com> <i_qdnflkkvu8n1zLnZ2dnUU78LednZ2d@giganews.com>

Show all headers | View raw


On Mon, 15 Feb 2016 00:39:30 +0200
Paavo Helde <myfirstname@osa.pri.ee> wrote:
> On 15.02.2016 0:15, Paavo Helde wrote:
> > On 14.02.2016 23:45, alexo wrote:  
> >> Il 14/02/2016 21:29, Paavo Helde ha scritto:  
> >>> On 14.02.2016 21:29, alexo wrote:  
> >>>> Il 14/02/2016 20:19, Paavo Helde ha scritto:
> >>>>  
> >>>>> On a second thought, why do you need sockets at all? If you
> >>>>> just want the program to send you an order by e-mail, you could
> >>>>> just open an URL like
> >>>>>
> >>>>> mailto:yourname@example.com?subject=Order&body=Order%20details%20here  
> >>>>
> >>>> The software I intend to use formats the info of the order sent
> >>>> in a way
> >>>> easy to intellect.
> >>>> My clients are too lazy to compile a form from their own with
> >>>> all the infos formatted in a readable way.  
> >>>
> >>> I guess you overlooked the body field in the URL.
> >>>  
> >>
> >> Probably I have not well understood your technique.
> >> Say that I push the send data button in m program to build the
> >> message how can I send it via mail using the mailto string you
> >> gave me?  
> >
> > You run xdg-email with the URL as an argument,  
> 
> Oh, and on Linux of course there should be the ancient 'mail' program 
> which can be automated even better and does not require user
> interaction or X-Windows. I guess from a C or C++ program this can be
> best launched by the popen() system call.

These days its mailx, according to IEEE Std 1003.1, 2013.  However, it
won't help.  First, ordinary users do not have mail servers running on
localhost, nor do they normally have sendmail or postfix installed.
Secondly, if they do, mail sent via them will probably be blocked, as
most spam blockers these days will reject mail not coming via a
recognised ISP's mail relay.  It so happens that for my own reasons I
do have a mail server running on localhost on my laptop, but it just
forwards on to a recognised mail relay for that reason.

The OP's problem is that he does not understand how email works.  What
he needs to do is obtain particulars of the user's ISP's mail relay,
or if the user is operating from business premises, of the business's
mail relay.  On windows, in cases where a user has Outlook installed
there may well be a system call to obtain the address previously
entered by the user (or by the system administrator) for the purposes of
email she sends via Outlook (I don't know if there is or there isn't,
but it would not surprise me if there is).  But that would only work
for users who do have Outlook installed, and there is no equivalent for
the general run of unix-like OSes.  My mail client for example requires
me to enter the mail relay into a configuration dialog when I first
start up the program.  Microsoft's consumer products do the same.

The other thing is that this has nothing to do with C++.  The OP would
have the same problem if he were coding with Python, Java, C or any
other language.

Chris

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 18:01 +0100
  Re: send email and socket programming JiiPee <no@notvalid.com> - 2016-02-14 17:07 +0000
    Re: send email and socket programming JiiPee <no@notvalid.com> - 2016-02-14 17:12 +0000
    Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 19:44 +0100
  Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-14 19:18 +0200
  Re: send email and socket programming Öö Tiib <ootiib@hot.ee> - 2016-02-14 09:39 -0800
    Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 20:23 +0100
  Re: send email and socket programming woodbrian77@gmail.com - 2016-02-14 10:47 -0800
  Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-14 21:19 +0200
    Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 20:29 +0100
      Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-14 22:29 +0200
        Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 22:45 +0100
          Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-15 00:15 +0200
            Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-15 00:39 +0200
              Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-14 23:01 +0000
                Re: send email and socket programming Geoff <geoff@invalid.invalid> - 2016-02-14 15:22 -0800
                Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 18:41 -0500
                Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-14 23:43 +0000
                Re: send email and socket programming Geoff <geoff@invalid.invalid> - 2016-02-14 17:33 -0800
                Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-15 09:37 +0200
                Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-15 10:04 +0000
                Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-15 10:14 +0000
                Re: send email and socket programming Geoff <geoff@invalid.invalid> - 2016-02-15 10:11 -0800
          Re: send email and socket programming Geoff <geoff@invalid.invalid> - 2016-02-14 15:16 -0800
  Re: send email and socket programming Ian Collins <ian-news@hotmail.com> - 2016-02-15 08:40 +1300
    Re: send email and socket programming "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-14 12:09 -0800
  Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 16:04 -0500
  Re: send email and socket programming jt@toerring.de (Jens Thoms Toerring) - 2016-02-14 21:20 +0000
    Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-14 22:40 +0100
      Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-14 22:20 +0000
        Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 18:01 -0500
          Re: send email and socket programming Ian Collins <ian-news@hotmail.com> - 2016-02-15 12:09 +1300
            Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 18:37 -0500
              Re: send email and socket programming Ian Collins <ian-news@hotmail.com> - 2016-02-15 13:06 +1300
                Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 21:40 -0500
          Re: send email and socket programming Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-02-14 23:35 +0000
            Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 21:43 -0500
      Re: send email and socket programming Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-14 18:05 -0500
  Re: send email and socket programming Christopher Pisz <nospam@notanaddress.com> - 2016-02-16 16:39 -0600
  Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-26 04:09 +0100
    Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-26 07:49 +0200
      Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-26 08:39 +0200
        Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-26 13:15 +0100
          Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-26 14:40 +0200
            Re: send email and socket programming Christopher Pisz <nospam@notanaddress.com> - 2016-02-26 16:41 -0600
              Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 13:38 +0100
                Re: send email and socket programming Öö Tiib <ootiib@hot.ee> - 2016-02-27 05:15 -0800
                Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 18:59 +0100
                Re: send email and socket programming Öö Tiib <ootiib@hot.ee> - 2016-02-27 10:41 -0800
                Re: send email and socket programming Paavo Helde <myfirstname@osa.pri.ee> - 2016-02-27 21:46 +0200
              Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 13:42 +0100
                Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 19:14 +0100
                Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 19:22 +0100
                Re: send email and socket programming guinness.tony@gmail.com - 2016-02-28 14:19 -0800
      Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-27 18:44 +0100
    Re: send email and socket programming Jorgen Grahn <grahn+nntp@snipabacken.se> - 2016-02-27 17:59 +0000
  Re: send email and socket programming alexo <alelvb@inwind.it> - 2016-02-29 14:16 +0100

csiph-web