View Full Version : Email a txt file using C in UNIX?
willz99ta
03-29-2005, 03:56 PM
Thanks for reading my message and for any help you can give.
I am trying to email a text file using C programming in UNIX. What is the easiest way of doing this?
Thanks for any help,
Willz99ta
dannyhayes
03-29-2005, 04:38 PM
Hi,
Is there a way of doing this I havnt come up with a way of doing this I dont think it is possible.
Could someone correct me if I am wrong.
Dr. Evil
03-29-2005, 05:38 PM
Use the socket functions to connect to an SMTP server then send it via SMTP commands. An excellent tutorial about sending via SMTP can be found here (http://www.yuki-onna.co.uk/email/smtp.html).
JWizard
03-31-2005, 01:19 AM
What I would do is use sendmail. Read up on sendmail in Linux. I wrote a chunk of code a while back to do exactly what you are trying to do using sendmail on the machine that it was running on. It worked great, in only a few lines of code!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.