Advertisement
Guest User

Untitled

a guest
Jul 16th, 2017
1,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ##
  4. ## User-configurable Variables
  5. ##
  6.  
  7. # Where "nail" is installed on your system.
  8. # We need this to actually send the mail, so make sure it's installed
  9. NAIL=/usr/bin/nail
  10.  
  11. # REQUIRED CHANGE #1: you must set SMTP_SERVER
  12. # http://www.host45.com/resources/ispsmtps.php has a list of ISP's smtp servers
  13. SMTP_SERVER=smtp.gmail.com
  14.  
  15. # REQUIRED CHANGE #2: you must set your email address.
  16. # option A: change "yourname@yourmail.com" here and remove the leading '#' to
  17. # use a real email address
  18. #TO_ADDR=yourname@yourmail.com
  19. #
  20. # option B: for an SMS message, set your phone number here and remove the
  21. # leading '#' on the PHONENUM line and your phone provider's TO_ADDR line
  22. #PHONENUM="1234567890"
  23. #TO_ADDR="$PHONENUM@message.alltel.com" # SMS: Alltel
  24. #TO_ADDR="$PHONENUM@txt.att.net" # SMS: AT&T (formerly Cingular)
  25. #TO_ADDR="$PHONENUM@myboostmobile.com" # SMS: Boost Mobile
  26. #TO_ADDR="$PHONENUM@sms.mycricket.com" # SMS: Cricket Wireless
  27. #TO_ADDR="$PHONENUM@messaging.nextel.com" # SMS: Nextel (Sprint Nextel)
  28. #TO_ADDR="$PHONENUM@messaging.sprintpcs.com" # SMS: Sprint (Sprint Nextel)
  29. #TO_ADDR="$PHONENUM@tmomail.net" # SMS: T-Mobile
  30. #TO_ADDR="$PHONENUM@vtext.com" # SMS: Verizon
  31. #TO_ADDR="$PHONENUM@vmobl.com" # SMS: Virgin Mobile USA
  32. #TO_ADDR="$PHONENUM@txt.bellmobility.ca" # SMS: Bell Canada
  33. #TO_ADDR="$PHONENUM@cwemail.com" # SMS: Centennial Wireless
  34. #TO_ADDR="$PHONENUM@csouth1.com" # SMS: Cellular Sout
  35. #TO_ADDR="$PHONENUM@gocbw.com" # SMS: Cincinnati Bell
  36. #TO_ADDR="$PHONENUM@mymetropcs.com" # SMS: Metro PCS 1
  37. #TO_ADDR="$PHONENUM@metropcs.sms.us" # SMS: Metro PCS 2
  38. #TO_ADDR="$PHONENUM@qwestmp.com" # SMS: Quest
  39. #TO_ADDR="$PHONENUM@pcs.rogers.com" # SMS: Rogers
  40. #TO_ADDR="$PHONENUM@tms.suncom.com" # SMS: Suncom
  41. #TO_ADDR="$PHONENUM@msg.telus.com" # SMS: Telus
  42. #TO_ADDR="$PHONENUM@email.uscc.net" # SMS: U.S. Cellular
  43.  
  44. ###
  45. ### Send the mail...
  46. ###
  47.  
  48. SUBJECT="Download completato!"
  49. FROM_ADDR="transmission@localhost.localdomain"
  50. TMPFILE=`mktemp -t transmission.XXXXXXXXXX`
  51. echo "Transmission ha terminato il download di "$TR_TORRENT_NAME" on $TR_TIME_LOCALTIME" >$TMPFILE
  52. $NAIL -v -S from="$FROM_ADDR" -S smtp -s "$SUBJECT" -S smtp=$SMTP_SERVER "$TO_ADDR" < $TMPFILE
  53. rm $TMPFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement