ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Auto print Email Attachment

(1/2) > >>

awopbamboo:
Hi All

Not posted he in a long time!!

What I need, is a simple standalone prog, perhaps minimised in the systray and sits a monitors a given POP email account r something like a GMAIL account ( I would obviously need to set the username/pass etc)

Then, when it find an email, it automatically prints (to the pc's default printer) any attachment to the email (not the whole email body itself, just the attachment).

Could have added options such as the option the delete/forward the email after being processed
Set the time delay for the check
 etc

But essentially, that's it.

If no one is interested, I will put together myself, but just putting it out there if anyone wants to give it a go, or if anyone is aware of something like this already?

I really do want it as simple as possible, and nice and portable?

Cheers

Awop

skrommel:
 :) PrintMail is a wrapper for getmail.exe from http://www.interlog.com/~tcharron/getmail.html.

Just add your user information, save the file as PrintMail.ahk in a folder, download and place getmail.exe beside it, and it will extract and print the attachments, and move the files to the Printed folder.
Download and install AutoHotkey to run the script.

Skrommel

23.07.2017: Added option to set target printer


--- ---;PrintMail.ahk
;  Print mail attachments, uses getmail.exe from http://www.interlog.com/~tcharron/getmail.html
;Skrommel @ 2017

target=Printed
popserver=
port=110
username=
password=
pause=60
deletefromserver=0
printer=

#NoEnv
#SingleInstance,Force
SetWorkingDir,%A_ScriptDir%

If deletefromserver=1
  delete=-delete
If printer<>
  printer=/d "%printer%

FileCreateDir,%target%
Loop
{
  RunWait,cmd /c getmail.exe -u %username% -pw %password% -s %popserver% -port %port% %delete% -xtract,,Hide
  FileMove,MSG*.txt,%target%
  Loop,*.*
  {
    If A_LoopFileName In PrintMail.ahk,PrintMail.exe,getmail.exe
      Continue
    RunWait,print %printer% "%A_LoopFileName%"
    FileMove,%A_LoopFileName%,%target%
  }
  Sleep,% 1000*pause
}

awopbamboo:
Nice one

Will give it a try.

awopbamboo:
Hi

Sorry, only just got round to testing this!

I downloaded getmail from the link you supplied, but immediately, Windoes Defender said it malicious and not to run it?  Any ideas if it is dodgy?

Ta

J.

skwire:
I downloaded getmail from the link you supplied, but immediately, Windoes Defender said it malicious and not to run it?  Any ideas if it is dodgy?-awopbamboo (August 05, 2017, 02:54 AM)
--- End quote ---

This is a false positive.  Anti-virus programs often flag email-related (especially commandline) programs as malicious as they are seen as potential spamming tools.  This particular program has been around forever and I've used it, along with Tim Charron's (same author) Grep, for many many years.

Navigation

[0] Message Index

[#] Next page

Go to full version