C library to send email

Discussion in 'C Programming' started by parser, Sep 16, 2006.

  1. parser

    parser Guest

    is there any C library ( popular or standardized ) for sending emails?
    parser, Sep 16, 2006
    #1
    1. Advertising

  2. parser wrote:

    > is there any C library ( popular or standardized ) for sending emails?


    What exactly do you have in mind ? If you already
    have in some file the text you want to email then you
    only have to use something like system("mail") or whatever
    command your platform uses to send emails. But if you
    want some library where you specify a file which will be the
    body of the email plus additional files which will serve as
    attachments and the library will combine those in a file which
    satisfies the MIME protocoll then I don't know. Actually I'm
    planning to write such a library myself eventually.
    Spiros Bousbouras, Sep 16, 2006
    #2
    1. Advertising

  3. parser

    CBFalconer Guest

    parser wrote:
    >
    > is there any C library ( popular or standardized ) for sending emails?


    Standard. Look up putc().

    --
    "The most amazing achievement of the computer software industry
    is its continuing cancellation of the steady and staggering
    gains made by the computer hardware industry..." - Petroski


    --
    Posted via a free Usenet account from http://www.teranews.com
    CBFalconer, Sep 16, 2006
    #3
  4. parser said:

    > is there any C library ( popular or standardized ) for sending emails?


    Why not just fish out the appropriate RFC and knock up your own?

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Sep 16, 2006
    #4
  5. Richard Heathfield wrote:

    > parser said:
    >
    > > is there any C library ( popular or standardized ) for sending emails?

    >
    > Why not just fish out the appropriate RFC and knock up your own?


    Because life is short ?
    Spiros Bousbouras, Sep 16, 2006
    #5
  6. Spiros Bousbouras said:

    > Richard Heathfield wrote:
    >
    >> parser said:
    >>
    >> > is there any C library ( popular or standardized ) for sending emails?

    >>
    >> Why not just fish out the appropriate RFC and knock up your own?

    >
    > Because life is short ?


    SMTP? Two monkeys, ten minutes.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Sep 16, 2006
    #6
  7. Richard Heathfield wrote:

    > Spiros Bousbouras said:
    >
    > > Richard Heathfield wrote:
    > >
    > >> parser said:
    > >>
    > >> > is there any C library ( popular or standardized ) for sending emails?
    > >>
    > >> Why not just fish out the appropriate RFC and knock up your own?

    > >
    > > Because life is short ?

    >
    > SMTP? Two monkeys, ten minutes.


    RFC821 is 67 pages. 10 minutes for 67 pages ?
    I don't think so unless you're a rapid reading
    wizard.
    Spiros Bousbouras, Sep 16, 2006
    #7
  8. Spiros Bousbouras said:

    > Richard Heathfield wrote:
    >
    >> Spiros Bousbouras said:
    >>
    >> > Richard Heathfield wrote:
    >> >
    >> >> parser said:
    >> >>
    >> >> > is there any C library ( popular or standardized ) for sending
    >> >> > emails?
    >> >>
    >> >> Why not just fish out the appropriate RFC and knock up your own?
    >> >
    >> > Because life is short ?

    >>
    >> SMTP? Two monkeys, ten minutes.

    >
    > RFC821 is 67 pages. 10 minutes for 67 pages ?
    > I don't think so unless you're a rapid reading
    > wizard.


    You can skip the boring bits. :)

    Seriously, SMTP is pretty easy. The hard bit of writing an email client is
    /not/ the sending and receiving of email. It's all the stuff around the
    edge - GUI, the various encodings, and so on. Sending the stuff is pretty
    trivial. The protocol is a simple one.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Sep 16, 2006
    #8
  9. Roland Pibinger, Sep 17, 2006
    #9
  10. parser

    parser Guest

    Spiros Bousbouras wrote:
    > parser wrote:
    >
    > > is there any C library ( popular or standardized ) for sending emails?

    >
    > What exactly do you have in mind ? If you already


    i know of libesmtp but i want a portable one that has bindings on
    almost all the platforms(UNIX/WINDOWS). if there isnt a one i would
    have to write my own.

    > have in some file the text you want to email then you
    > only have to use something like system("mail") or whatever
    > command your platform uses to send emails. But if you
    > want some library where you specify a file which will be the
    > body of the email plus additional files which will serve as
    > attachments and the library will combine those in a file which
    > satisfies the MIME protocoll then I don't know. Actually I'm
    > planning to write such a library myself eventually.
    parser, Sep 18, 2006
    #10
  11. parser

    Guest

    , Nov 4, 2012
    #11
  12. parser

    Guest

    On Saturday, September 16, 2006 10:42:35 AM UTC-7, Richard Heathfield wrote:
    > SMTP? Two monkeys, ten minutes.


    How many monkeys and minutes to write a newsreader?

    And if it's less than a million each why can't Google(TM) do it?

    ---
    William Ernest Reid
    , Nov 4, 2012
    #12
  13. parser

    Guest

    Superb replies guys. I think it's best to use sendmail and run system() function by writing to a temporary file and using this system command

    cat tempfile | sendmail -v -t

    tempfile:
    From: fromemail
    To: toemail
    Subject: subj
    Content-type: text/plain
    MIME-Version: 1.0
    CC: ...
    BCC: ...

    My message
    ..
    , Mar 23, 2014
    #13
  14. parser

    Kaz Kylheku Guest

    On 2014-03-23, <> wrote:
    > Superb replies guys. I think it's best to use sendmail and run system() function by writing to a temporary file and using this system command
    >
    > cat tempfile | sendmail -v -t


    UUOC!

    < tempfile sendmail -v -t
    Kaz Kylheku, Mar 23, 2014
    #14
  15. In article <>,
    Kaz Kylheku <> wrote:
    >On 2014-03-23, <> wrote:
    >> Superb replies guys. I think it's best to use sendmail and run system()

    >function by writing to a temporary file and using this system command
    >>
    >> cat tempfile | sendmail -v -t

    >
    >UUOC!
    >
    >< tempfile sendmail -v -t


    For that matter, UUoTf...

    "man popen"

    --

    Some of the more common characteristics of Asperger syndrome include:

    * Inability to think in abstract ways (eg: puns, jokes, sarcasm, etc)
    * Difficulties in empathising with others
    * Problems with understanding another person's point of view
    * Hampered conversational ability
    * Problems with controlling feelings such as anger, depression
    and anxiety
    * Adherence to routines and schedules, and stress if expected routine
    is disrupted
    * Inability to manage appropriate social conduct
    * Delayed understanding of sexual codes of conduct
    * A narrow field of interests. For example a person with Asperger
    syndrome may focus on learning all there is to know about
    baseball statistics, politics or television shows.
    * Anger and aggression when things do not happen as they want
    * Sensitivity to criticism
    * Eccentricity
    * Behaviour varies from mildly unusual to quite aggressive
    and difficult
    Kenny McCormack, Mar 23, 2014
    #15
  16. writes:
    > Superb replies guys. I think it's best to use sendmail and run
    > system() function by writing to a temporary file and using this system
    > command
    >
    > cat tempfile | sendmail -v -t
    >
    > tempfile:
    > From: fromemail
    > To: toemail
    > Subject: subj
    > Content-type: text/plain
    > MIME-Version: 1.0
    > CC: ...
    > BCC: ...
    >
    > My message
    > .


    Though it's not direectly relevant to C, I'll point out that
    that's a "Useless Use Of cat". Any use of

    cat filename | command

    is better written as

    command < filename

    There's no need to invoke an extra "cat" command just to feed a
    command's standard input.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Mar 23, 2014
    #16
  17. parser

    Kaz Kylheku Guest

    On 2014-03-23, Kenny McCormack <> wrote:
    > In article <>,
    > Kaz Kylheku <> wrote:
    >>On 2014-03-23, <> wrote:
    >>> Superb replies guys. I think it's best to use sendmail and run system()

    >>function by writing to a temporary file and using this system command
    >>>
    >>> cat tempfile | sendmail -v -t

    >>
    >>UUOC!
    >>
    >>< tempfile sendmail -v -t

    >
    > For that matter, UUoTf...
    >
    > "man popen"


    Indeed. What are the odds that a "sendmail -v -t" command is available, and yet
    you don't have a popen function.
    Kaz Kylheku, Mar 23, 2014
    #17
  18. In article <>,
    Kaz Kylheku <> wrote:
    >On 2014-03-23, Kenny McCormack <> wrote:
    >> In article <>,
    >> Kaz Kylheku <> wrote:
    >>>On 2014-03-23, <> wrote:
    >>>> Superb replies guys. I think it's best to use sendmail and run system()
    >>>function by writing to a temporary file and using this system command
    >>>>
    >>>> cat tempfile | sendmail -v -t
    >>>
    >>>UUOC!
    >>>
    >>>< tempfile sendmail -v -t

    >>
    >> For that matter, UUoTf...
    >>
    >> "man popen"

    >
    >Indeed. What are the odds that a "sendmail -v -t" command is available, and yet
    >you don't have a popen function.


    Quite so.

    --
    Those on the right constantly remind us that America is not a
    democracy; now they claim that Obama is a threat to democracy.
    Kenny McCormack, Mar 23, 2014
    #18
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    0
    Views:
    3,333
    Peter
    Jul 1, 2003
  2. Replies:
    2
    Views:
    383
    Tintin
    Jan 5, 2007
  3. Replies:
    13
    Views:
    446
    Randy Webb
    May 14, 2006
  4. pbd22
    Replies:
    1
    Views:
    137
  5. ashish makani
    Replies:
    5
    Views:
    563
    Mark Lawrence
    Sep 20, 2012
Loading...

Share This Page