![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to send mail in Unix | konankir | Shell Programming and Scripting | 6 | 06-12-2008 05:28 AM |
| send mail from UNIX | prashanth_gs | SUN Solaris | 5 | 12-18-2006 04:25 PM |
| I am not able to send mail form unix to other mail accounts. | chinnigd | UNIX for Dummies Questions & Answers | 1 | 04-06-2006 05:31 AM |
| how to send mail in unix | rajan_ka1 | Shell Programming and Scripting | 12 | 01-10-2006 11:47 PM |
| can not send mail from unix server to company/yahoo mail | b5fnpct | UNIX for Dummies Questions & Answers | 5 | 11-22-2002 06:24 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
? i want to send a mail with a C code under Unix ?
Hi all !
I want to know if i can send an email with a C code... the thing i wanna do is when my code is finished it creates a log file with all the information of the process in it...i want to know if its possible at the and of my code in C, under Unix_Solaris, to send that log file to a specified email adress and thats it ? Thanks for answering fast ! Unknown Coder |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Yes it's possible. I would just use a popen() to a mailx process.
|
|
#3
|
|||
|
|||
|
and how can i use this method ?
if you have a doc or something to help me with that...it will be appreciated thanks ! |
|
#4
|
||||
|
||||
|
Try "man popen". I don't have a popen doc.
|
|
#5
|
|||
|
|||
|
I've done this in C++ using a system command
mailx -s SUBJECT yourname@yourE-MailAddress < logFile write the above code into a char string then use: system ( command ); in your code, the SUBJECT can be set to anything you want, and the logFile is simply a file with all the info you want in your e-mail. You might have to play around with your e-mail address, test it in a shell window first, I had to use @intranet since it was internal. Hope this helps. Cheers |
|||
| Google The UNIX and Linux Forums |