[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Sending mail in C/PRO*C in a UNIX Environment

I am using PROC*C, UNIX and ORACLE.  I have already writen a PRO*C program to fetch data from ORACLE and generate a Text file. I would like to use the mail feature inside C  program to send email with the contents of the text file.
  Any solutions ?  Need more detailed reply.

0
kkolya
Asked:
kkolya
  • 2
1 Solution
 
ozoCommented:
system("/usr/lib/sendmail kkolya@experts-exchange.com <text.file");
0
 
kkolyaAuthor Commented:
How is the performance of sending email in C program using system command. ? What is the fast way to send email when there is processing and data gathering to create email body using PRO*C. This mass email sending depending on the data.
0
 
ozoCommented:
system() does spawn an extra command shell,
It could be more efficient to pipe directly to a sendmail process instead of using a shell to send a file to it.
(By the way, if you have followup questions it is usually better to keep the question open until they are resolved.
You may get the benefit of other people contributing to the answer)
0

Featured Post

Live webcast with Pinal Dave

Pinal Dave will teach you tricks to help identify the real root cause of database problems rather than red herrings. Attendees will learn scripts that they can use in their environment to immediately figure out their performance Blame Shifters and fix them quickly.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now