- Posts: 338
- Thank you received: 0
PP call home.
6 years 11 months ago #150768
by Vmax549
PP call home. was created by Vmax549
If anyone is interested here is a script to be able to send messages to an email account from PathPilot.
How you use it and how you trigger it is up to you.
(
TP
#!/bin/bash
# send message to email
import smtplib
server = smtplib.SMTP( "smtp.YourSmtpServer.com", 587 ) ## there is a known list of servers for email providers
server.starttls()
server.login( 'You@email.com', 'YOUR_PASSWORD' )
from_mail = 'YOU@Email.com'
to = 'THEM@EMAIL.com'
body = 'Router #1 ERROR , Broken tool bit' ### actual message string
message = ("From: %s\r\n" % from_mail + "To: %s\r\n" % to + "Subject: %s\r\n" % '' + "\r\n" + body)
server.sendmail(from_mail, to, message)
server.quit()
How you use it and how you trigger it is up to you.
(
#!/bin/bash
# send message to email
import smtplib
server = smtplib.SMTP( "smtp.YourSmtpServer.com", 587 ) ## there is a known list of servers for email providers
server.starttls()
server.login( 'You@email.com', 'YOUR_PASSWORD' )
from_mail = 'YOU@Email.com'
to = 'THEM@EMAIL.com'
body = 'Router #1 ERROR , Broken tool bit' ### actual message string
message = ("From: %s\r\n" % from_mail + "To: %s\r\n" % to + "Subject: %s\r\n" % '' + "\r\n" + body)
server.sendmail(from_mail, to, message)
server.quit()
Please Log in to join the conversation.
6 years 11 months ago #151162
by andypugh
Replied by andypugh on topic PP call home.
I think that this is not limited to Pathpilot? It could be run as a user M-code by any LinuxCNC version.
Please Log in to join the conversation.
Time to create page: 0.077 seconds
