Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C library to send email

1,119 views
Skip to first unread message

parser

unread,
Sep 16, 2006, 8:31:53 AM9/16/06
to
is there any C library ( popular or standardized ) for sending emails?

Spiros Bousbouras

unread,
Sep 16, 2006, 9:28:18 AM9/16/06
to
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.

Richard Heathfield

unread,
Sep 16, 2006, 1:23:01 PM9/16/06
to
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)

Spiros Bousbouras

unread,
Sep 16, 2006, 1:24:32 PM9/16/06
to
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 ?

Richard Heathfield

unread,
Sep 16, 2006, 1:42:35 PM9/16/06
to
Spiros Bousbouras said:

SMTP? Two monkeys, ten minutes.

Spiros Bousbouras

unread,
Sep 16, 2006, 2:00:39 PM9/16/06
to
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.

Richard Heathfield

unread,
Sep 16, 2006, 3:31:55 PM9/16/06
to
Spiros Bousbouras said:

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.

CBFalconer

unread,
Sep 16, 2006, 9:32:07 AM9/16/06
to
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

Roland Pibinger

unread,
Sep 17, 2006, 5:21:55 PM9/17/06
to
On 16 Sep 2006 05:31:53 -0700, "parser" <saleem....@gmail.com>
wrote:

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

Maybe http://www.stafford.uklinux.net/libesmtp/

parser

unread,
Sep 18, 2006, 8:56:25 AM9/18/06
to

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.

bre...@sanders.org

unread,
Nov 4, 2012, 5:03:29 AM11/4/12
to
Check out libquickmail at http://sourceforge.net/projects/libquickmail/
This C library allows sending e-mails with attachments.
It is designed to be easy to use and has been tested on Windows and Linux.

horme...@gmail.com

unread,
Nov 4, 2012, 9:29:28 AM11/4/12
to inv...@invalid.invalid
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

viju....@gmail.com

unread,
Mar 23, 2014, 6:48:01 AM3/23/14
to
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
.

Kaz Kylheku

unread,
Mar 23, 2014, 11:10:31 AM3/23/14
to
On 2014-03-23, viju....@gmail.com <viju....@gmail.com> 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

Kenny McCormack

unread,
Mar 23, 2014, 12:36:22 PM3/23/14
to
In article <201403230...@kylheku.com>,
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

Keith Thompson

unread,
Mar 23, 2014, 2:36:37 PM3/23/14
to
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) ks...@mib.org <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"

Kaz Kylheku

unread,
Mar 23, 2014, 3:03:03 PM3/23/14
to
On 2014-03-23, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> In article <201403230...@kylheku.com>,
> Kaz Kylheku <k...@kylheku.com> wrote:
>>On 2014-03-23, viju....@gmail.com <viju....@gmail.com> 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.

Kenny McCormack

unread,
Mar 23, 2014, 3:10:59 PM3/23/14
to
In article <20140323...@kylheku.com>,
Kaz Kylheku <k...@kylheku.com> wrote:
>On 2014-03-23, Kenny McCormack <gaz...@shell.xmission.com> wrote:
>> In article <201403230...@kylheku.com>,
>> Kaz Kylheku <k...@kylheku.com> wrote:
>>>On 2014-03-23, viju....@gmail.com <viju....@gmail.com> 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.
0 new messages