473,383 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Monitoring events in my program and emailing reports

Pie
I like to have my program (running on my home machine)
email me (wherever I am) whenever it reaches a certain mile-stone
(finishes a phase of the simulation or runs into an interesting
path in the simulation). I just like add the feature so it can
email me the partial results. Is there a source code for
something like this I can add to my program? Do I need
an SMTP server code or can I use my current SMTP ISP smtp
server to email myself?

I know I can always write the results in d file on my web
server, but I want results emailed to myself when needed.

Thanks a lot in advance.

Ben
Jul 22 '05 #1
13 1368
Pie wrote:
I like to have my program (running on my home machine)
email me (wherever I am) whenever it reaches a certain mile-stone
(finishes a phase of the simulation or runs into an interesting
path in the simulation). I just like add the feature so it can
email me the partial results. Is there a source code for
something like this I can add to my program? Do I need
an SMTP server code or can I use my current SMTP ISP smtp
server to email myself?

I know I can always write the results in d file on my web
server, but I want results emailed to myself when needed.

Thanks a lot in advance.

Ben


There may be sources available, but 1) this is not comp.sources.wanted
and 2) those sources won't be in standard C++ (the topic here), since
standard C++ has no support for email, or networking of any kind.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Jul 22 '05 #2
Kevin Goodsell wrote:
Pie wrote:
I like to have my program (running on my home machine)
email me (wherever I am) whenever it reaches a certain mile-stone
(finishes a phase of the simulation or runs into an interesting path
in the simulation). I just like add the feature so it can
email me the partial results. Is there a source code for
something like this I can add to my program? Do I need
an SMTP server code or can I use my current SMTP ISP smtp
server to email myself?
I know I can always write the results in d file on my web
server, but I want results emailed to myself when needed.

Thanks a lot in advance.

Ben

There may be sources available, but 1) this is not comp.sources.wanted
and 2) those sources won't be in standard C++ (the topic here), since
standard C++ has no support for email, or networking of any kind.


True that.

If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to the
program.

Jul 22 '05 #3
Jeff Schwab wrote:
If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to the
program.


But you can't open a pipe using standard C++.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Jul 22 '05 #4
Kevin Goodsell wrote:
Jeff Schwab wrote:
If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to
the program.


But you can't open a pipe using standard C++.


Yes, you can. You just have to make a platform-specific system call.
The system may or may not provide such functionality, just as it may or
may not provide a mail program with a CLI. There is nothing in the
standard that says you can't open a pipe.
Jul 22 '05 #5
Jeff Schwab wrote:
Kevin Goodsell wrote:
Jeff Schwab wrote:
If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to
the program.

But you can't open a pipe using standard C++.

Yes, you can. You just have to make a platform-specific system call.


How is a a platform-specific system call standard C++?
The system may or may not provide such functionality, just as it may or
may not provide a mail program with a CLI. There is nothing in the
standard that says you can't open a pipe.


There's nothing that says you can't travel through time, either. Maybe I
should get to work on that standard C++ time travel program.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Jul 22 '05 #6
Kevin Goodsell wrote:
Jeff Schwab wrote:
Kevin Goodsell wrote:
Jeff Schwab wrote:

If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to
the program.
But you can't open a pipe using standard C++.


Yes, you can. You just have to make a platform-specific system call.

How is a a platform-specific system call standard C++?


What part of it violates the standard? Calling a function that's not
part of the standard library doesn't make a program non-standard. Don't
you use functions you wrote yourself, or functions someone else wrote
for you? System calls are the latter.
The system may or may not provide such functionality, just as it may
or may not provide a mail program with a CLI. There is nothing in the
standard that says you can't open a pipe.

There's nothing that says you can't travel through time, either. Maybe I
should get to work on that standard C++ time travel program.


LOL. Yes, I think you should. :)
Jul 22 '05 #7
"Kevin Goodsell" <us*********************@neverbox.com> wrote
Jeff Schwab wrote:
Kevin Goodsell wrote:
Jeff Schwab wrote:

If you have a command-line program to mail stuff on your platform
already, you could use system( "mail myfile.txt" ) or open a pipe to
the program.
But you can't open a pipe using standard C++.

Yes, you can. You just have to make a platform-specific system call.


How is a a platform-specific system call standard C++?


I think the problem here -- and it's a recurring one -- is in the phrasing of
that assertion. It's misleading toward beginners to state that "you can't do
[networking|graphics|etc.] in Standard C++" and it's pejorative to C++ to imply
such an inability. The standard has never precluded using third party libraries
and a program that does use third party libraries doesn't suddenly become
non-conforming. If instead, it were phrased as "that functionality is not
included in the core language or the standard libraries and discussions of
third party or platform-specific libraries is off-topic in this newsgroup", it
would not mislead anyone into thinking it a limitation of C++, which it clearly
isn't.

Claudio Puviani
Jul 22 '05 #8
Jeff Schwab wrote:
Kevin Goodsell wrote:

How is a a platform-specific system call standard C++?

What part of it violates the standard? Calling a function that's not
part of the standard library doesn't make a program non-standard. Don't
you use functions you wrote yourself, or functions someone else wrote
for you? System calls are the latter.


I'm not saying it violates the standard, I'm saying it's /not/ standard.
In other words, it's not defined by the standard. A program that "opens
a pipe" is using non-standard functionality, and can no longer be
considered a standard C++ program.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Jul 22 '05 #9
Kevin Goodsell wrote:
Jeff Schwab wrote:
Kevin Goodsell wrote:

How is a a platform-specific system call standard C++?


What part of it violates the standard? Calling a function that's not
part of the standard library doesn't make a program non-standard.
Don't you use functions you wrote yourself, or functions someone else
wrote for you? System calls are the latter.


I'm not saying it violates the standard, I'm saying it's /not/ standard.
In other words, it's not defined by the standard. A program that "opens
a pipe" is using non-standard functionality, and can no longer be
considered a standard C++ program.


Are you saying a pipe can't be implemented in C++?
Jul 22 '05 #10
Jeff Schwab wrote:

Are you saying a pipe can't be implemented in C++?


I'm not 100% sure that I know exactly what you mean by "pipe", but the
C++ standard does not provide any means of communication between
processes, so I don't believe you can implement it in standard C++ (that
is, using the functionality provided by the C++ standard).

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Jul 22 '05 #11
Kevin Goodsell wrote:
Jeff Schwab wrote:

Are you saying a pipe can't be implemented in C++?

I'm not 100% sure that I know exactly what you mean by "pipe", but the
C++ standard does not provide any means of communication between
processes, so I don't believe you can implement it in standard C++ (that
is, using the functionality provided by the C++ standard).


There is no direct provision for pipes in the standard, just as there is
no direct support for GUI's. However, both can be implemented in C++.
If you just mean that pipes aren't mentioned in the C++ standard, then I
agree with you wholeheartedly. I don't think acknowledging that we do
have operating systems, and that these systems sometimes support pipes,
is off-topic in comp.lang.c++ though. If you want to stick to a strict
discussion of the ISO standard, check out comp.std.c++. I lurk there
myself.
Jul 22 '05 #12
Claudio Puviani wrote:
"Kevin Goodsell" <us*********************@neverbox.com> wrote
Jeff Schwab wrote: [no you can't - yes I can redacted]


I think the problem here -- and it's a recurring one -- is in the phrasing of
that assertion. It's misleading toward beginners to state that "you can't do
[networking|graphics|etc.] in Standard C++" and it's pejorative to C++ to imply
such an inability. The standard has never precluded using third party libraries
and a program that does use third party libraries doesn't suddenly become
non-conforming. If instead, it were phrased as "that functionality is not
included in the core language or the standard libraries and discussions of
third party or platform-specific libraries is off-topic in this newsgroup", it
would not mislead anyone into thinking it a limitation of C++, which it clearly
isn't.


Nicely phrased Claudio! I like it!
Jul 22 '05 #13
red floyd wrote:
Claudio Puviani wrote:
"Kevin Goodsell" <us*********************@neverbox.com> wrote
Jeff Schwab wrote:

> [no you can't - yes I can redacted]


I think the problem here -- and it's a recurring one -- is in the
phrasing of
that assertion. It's misleading toward beginners to state that "you
can't do
[networking|graphics|etc.] in Standard C++" and it's pejorative to C++
to imply
such an inability. The standard has never precluded using third party
libraries
and a program that does use third party libraries doesn't suddenly become
non-conforming. If instead, it were phrased as "that functionality is not
included in the core language or the standard libraries and
discussions of
third party or platform-specific libraries is off-topic in this
newsgroup", it
would not mislead anyone into thinking it a limitation of C++, which
it clearly
isn't.

Nicely phrased Claudio! I like it!


I agree. In this instance, I didn't mention any particular
platform-specific library, just a feature common to most general-purpose
operating systems. In the general case, though, I think you've summed
it up nicely.
Jul 22 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Count László de Almásy | last post by:
Greetings, I'm in need of a simple GUI application that "monitors" a range of hosts using ping and reports on their status by changing the panel color for that host (i.e, green for pingable, red...
5
by: Wally | last post by:
Hi Hi need to monitoring my windows service written in VB NET. How can my monitor application "feel" that my service has made something? Is the only way a polling (for example on a Db table)?...
7
by: SQLDBA | last post by:
I am in the process of evaluating some SQL Performance Monitoring /DBA tool to purchase (For SQL Server 2000). I have the following list of software that I came across and have to finalize which...
3
by: JSheble | last post by:
I have a windows service that in the OnStart it creates a thread and runs a loop forever and ever, assuming the service is running. The loop stops during the OnStop event, and everything works...
2
by: Greg Allen | last post by:
I know this has been discussed before, and have found some documentation about it on the web. But nothing has fixed my problem. I am running the 1.1 .NET framework, SP1. I have a web...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
0
by: developer | last post by:
I am trying to get a custom provider to receive health monitoring events in vb.net, whidbey beta 1. I have a health monitoring setup like this in my web.config: <healthMonitoring enabled="true">...
6
by: Bob | last post by:
I have an app running 24 7 on a computer hiden away in a closet. I need to be able to monitor if it has thrown any unhandled exceptions or if it is no longer responding from another computer on the...
0
by: athos | last post by:
Dear guys, Now we are trying to build an Audit-Log module for our projects. The idea is to 1. develop a module that could be used by different projects to save the log, including account...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.