C library to send email

S

Spiros Bousbouras

parser said:
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.
 
R

Richard Heathfield

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?
 
S

Spiros Bousbouras

Richard said:
Spiros Bousbouras said:


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.
 
R

Richard Heathfield

Spiros Bousbouras said:
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.
 
P

parser

Spiros said:
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.
 
V

viju.kantah

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
..
 
K

Kaz Kylheku

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
 
K

Kenny McCormack

function by writing to a temporary file and using this system command

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
 
K

Keith Thompson

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top