#UBUTNTU SEND MAIL USING SSMTP FROM PHP HOW TO# Once you've configurd sSMTP it's time to try and send an email. The simplest way to do this is to run sSMTP in a terminal with a recipient email address. Ssmtp will then wait for you to type your message, which needs to be formatted like this: Note the blank like after the subject field. Once you have finished composing your email hit Ctrl-D.Įverything you type from the Hello World! onwards is the body of the email. After a few seconds sSMTP will send the message. Here is such a text file for use in the script which monitors CPU Temperatures: Obviously you don't want to be doing stuff from the Command Line each time you want to send an email so it's better to write a little text file containing the email contents. If you look at the script itself you can see it's being called on the following line: The critical CPU temperature has been reached.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |