sending an email from a C/C++ program in linux

后端 未结 5 1663
花落未央
花落未央 2020-12-24 08:57

I would like to send an email to my gmail account everytime my simulation ends. I have tried searching the web and found sendEmail but it is timing-out. If anyone could poin

5条回答
  •  情话喂你
    2020-12-24 09:45

    I like the answer of trojanfoe above, BUT in my case I needed to turn on an email sending agent.. an MTA to enable linux to send emails - I have found exim4 to be a relatively simple MTA to get working and that trojanfoe's program works very nicely with it.

    to get it to work I used (on a debian type system in a virtual box (crunchbang linux))

    sudo apt-get install exim

    sudo apt-get install mailutils

    I configured exim4 with

    sudo dpkg-reconfigure exim4-config

    and I told the computer about my normal (remote) email address with

    sudo emacs /etc/email-addresses

    hope this might be useful as these were the steps I found worked to get my linux system sending email with trojanfoe's email program above

提交回复
热议问题