DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Auto Email Screenshot  (Read 4,956 times)

parlay

  • Participant
  • Joined in 2013
  • *
  • Posts: 1
Auto Email Screenshot
« on: April 24, 2013, 05:17 PM »
I was wondering if this or any software available will on a scheduled basis load a webpage, capture a screenshot and then email it to a list of people. I have looked hi and low and have had zero luck. Most software available does one or the other but not both.

TaoPhoenix

  • 0 - 60 ... then back to 0 again!
  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • Participated in NANY Challenge Three Times
Re: Auto Email Screenshot
« Reply #1 on: April 24, 2013, 07:03 PM »

That's a fascinating feature (idea)!
Use attachthumb=# to show an attached image as an expandable thumbnail, or attach=# to show full size. (With Brackets)

x16wda

  • what am I doing in this handbasket?
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
    • Participated in NANY Challenge Once
Re: Auto Email Screenshot
« Reply #2 on: April 25, 2013, 02:17 AM »
Easy to do with a batch file and two utilities.  wkhtmltopdf (or wkhtmltoimage) to pull the web page, then blat to send it on.  From what I remember it took some testing to figure out the command line for the wk stuff (I can check at work, I used it to do some monitoring a few years ago) but it wasn't too hard.  Blat is the command line mailer bomb.  Oh yeah, and a scheduled task to run the batch file.
vi vi vi - editor of the beast
« Last Edit: April 25, 2013, 02:18 AM by x16wda »

x16wda

  • what am I doing in this handbasket?
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
    • Participated in NANY Challenge Once
Re: Auto Email Screenshot
« Reply #3 on: April 26, 2013, 01:17 AM »
Here is a sample of the 3-liner I used (slightly obfuscated):

Code: (text)
@for /f %%i in ('datex.exe -f yyyymmddhhnn') do @set mydt=%%i
wkhtmltopdf.exe --page-size Letter http://prtg/sensor.htm^?gr188=1^&timeout=60^&id=188^&position=0 d:\storage\ntt-graphs-%mydt%.pdf
blat.exe - -to you1@domain.com,you2@domain.com -subject "emailed web page" -from sender@domain.com -attach d:\storage\ntt-graphs-%mydt%.pdf -body "graph attached"

Datex.exe is from Bill Stewart's site
Blat is from the Blat site
wkhtmltopdf is from this Google Code page
vi vi vi - editor of the beast

Original address: https://www.donationcoder.com/forum/index.php?topic=34743.0