In article <11**********************@z14g2000cwz.googlegroups .com>,
am*******@gmail.com <am*******@gmail.com> wrote:
Hi all,
Is there any way to read a email address from a text file and send
email to that address using C language. any hint or any code regarding
this will be very helpful.
Use fopen and fgets to read lines from the file, and examine the buffer
you're reading into (either by looking at individual characters or
using the strxxx functions in <string.h>) to see whether you got an
email address.
Sending mail requires features not defined by the C standard and is
therefore beyond the scope of comp.lang.c . There's a good chance there
are better tools than C for whatever you're trying to do anyways.
(Unless you're trying to write a massmailing spam program, in which case
you can get better results just by writing the mail to /dev/null, NUL,
or something else not entirely unlike these, whichever is supported by
your OS - aside from that one detail, the entire program can be written
in portable C.)
dave
(maintains a small mailing list with a 5-line shell script)
--
Dave Vandervies
dj******@csclub.uwaterloo.ca
Of course I have other blind spots than this one (conservation of
ineptitude and all that), but I can't see them.
--Chris Dollin in comp.lang.c