[Tfug] email question
Andrew Ayre
andy at britishideas.com
Tue Jun 26 14:35:58 MST 2007
Some random ideas (I'm sure there are better ones out there):
- work out the command line for sendmail or mail to send an email,
maybe something like:
/usr/bin/sendmail some_options < /tmp/message.txt
then generate /tmp/message.txt and use system() to call the command
- write a perl script that reads from stdin or a file and sends an
email. Call the perl script from your C application. This has the
advantage in that you can use the perl CPAN modules for sending emails,
complete with attachments, etc. Also probably more portable between systems
- find a C library for linux that can send emails
Hope this helps, Andy
Joe Blais wrote:
>> Andrew Ayre
>> Sent: Tuesday, June 26, 2007 1:21 PM
>> To: Tucson Free Unix Group
>> Subject: Re: [Tfug] email question
>>
>>
>> Which programming language or scripting language are you using?
>>
>> For perl and PHP you can get modules that make sending emails (with
>> attachments, etc.) easier. Also in C (and the other languages) you can
>> use system() to execute programs like sendmail, etc.
>>
>> Andy
>>
>
> Andy, Hello
>
> C/C++
>
> I am/was planning on making system calls to unix/linux command line e-mail
> applications.
>
> I was looking at sendmail.org. It appears as though setting it up isn't
> just a matter of setting some config stuff. It appears as though it's, to
> some degree, recompiled or reconfigured using make and m4 "stuff". That
> seems like a configuration headache to figure out what stuff I need to
> include on the final system.
>
> Joe
>
>
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>
--
Andy
PGP Key ID: 0x67090A54
More information about the tfug
mailing list