Can I make a program that emails me?

0 Nathan T · October 19, 2015
I want to have something where if someone opens it it emails me

Post a Reply

Replies

Oldest  Newest  Rating
0 Tom B · October 26, 2015
Without looking too deeply into this I would suggest, if you're running Linux, using the exec functions (http://stackoverflow.com/questions/4204915/please-explain-exec-function-and-its-family) or system() (http://www.tutorialspoint.com/c_standard_library/c_function_system.htm) with something such as mutt although there are probably better ways of going about it (i.e. libraries so you're not dependant on command line tools).
0 Nathan T · October 28, 2015
so if i include an application in the same file that will email me i do it?
0 Tom B · October 30, 2015
No, this would only be the equivalent of starting the program from the command line but I don't think you could bundle the other program with your executable. This might give you some ideas though: http://tecadmin.net/ways-to-send-email-from-linux-command-line/# You could probably also make an installer though using the exec functions and/or just a bash script if you're using Linux with apt or some other package manager. Essentially what you're looking at working with is interprocess communication. Sadly there's not much info on the web that I can find that presents itself in an easy to understand/follow manner. I'd still look around though and see what you can find. I also recommend if you want to learn more with C is Head First C (http://www.amazon.com/Head-First-C-David-Griffiths/dp/1449399916). It will give you a pretty good introduction to it. I'll also try to get you an example of this working if I can find the time sometime soon. I just have a lot going on this week and sort of this weekend too but I'll see to it. Good luck with stuff in the mean time :P
  • 1

C

106,984 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator