mont266
Posts: 2
Joined: Tue Jun 30, 2015 1:02 am

Printing Emails?

Sat May 28, 2016 12:47 pm

I have a website that I am currently developing. I have used a ContactMe form on the site to receive emails from whoever fills the form in. The emails are sent to a completely separate email account that will only receive ContactMe emails and won't be used for anything else. I used this because I am terrible when it comes to PHP and don't fully understand how it works but I want to use my Raspberry Pi to print out every email that is sent to that email account the moment the email goes through. Is there a simple solution to doing this? Maybe even in Python that wouldn't be insane.

Cheers!

epoch1970
Posts: 5132
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Printing Emails?

Sat May 28, 2016 1:42 pm

I think I would go with procmail, like here:
viewtopic.php?t=38719

(and use a PDF printer...)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Printing Emails?

Sat May 28, 2016 2:21 pm

Hi,
Is not clear for me.
You contact form send email to some account? (Hosted on some ISP).
Or you contact form run on raspberry pi on you office?

But, printing email not make sense for me.
Having printer configured and working (see about cups).
From email, need to use fetchmail to get email from server, and promail to process and print email.
I not use both for long time. Need to write some script to process email.

If contact form run on rpi, side of printer.
Using any server side processing (php, phyton, etc), after form submit are validated, just pipe formated text do lp tools.
I think, I done similar task a decades ago using php.

If you need code example, we need coins. :D

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Printing Emails?

Sat May 28, 2016 3:39 pm

In order to use a printer with the Pi. You need one that has Arm drivers available for Cups. You can look over at http://www.openprinting.org/drivers for which ones may be.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Return to “Beginners”