Hello
Guest
it is
May 13, 2025, 01:03:27 PM
Guest
Login
Register
Menu
Home
Help
Search
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
General Mach Discussion
/
Any way I can get Mach to send me an email when it's finished?
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: Any way I can get Mach to send me an email when it's finished? (Read 10154 times)
0 Members and 1 Guest are viewing this topic.
jallitt
44
Any way I can get Mach to send me an email when it's finished?
«
on:
May 11, 2009, 10:29:00 PM »
Is is possible to hook up a bit of VB to M5 to send me an email letting me know mach has finished?
I can think about 6 ways to make a linux machine send me an email - but windows and VB are a mystery...
Logged
Jeff_Birt
1,107
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #1 on:
May 12, 2009, 09:29:38 AM »
I'm not sure under the Cypress flavor of VB that mach uses. It can call other libraries though. I would do some googling on sending email in VB script or VB 6. That should be pretty close. I have some code around somewhere for VB.NET that I used for an introductory class on VB. If I can find it I'll post it.
I just found lots of info searching for 'VBscript send email', here is one:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/enterprise/mail/
«
Last Edit: May 12, 2009, 09:34:57 AM by Jeff_Birt
»
Logged
Happy machining , Jeff Birt
Check out
www.soigeneris.com
jallitt
44
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #2 on:
May 12, 2009, 08:38:27 PM »
That looks similar to the code I found....
here's my new M5 script works when run manually - haven't tried it from a real job yet - obviously replace username, password, server, and email addresses. It's probably possible to omit the username and password but I don't have an email client setup on the computer running mach...
=====================
DoSpinStop()
Code "(sending mail)"
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "mach finished"
objMessage.Sender = "youremail@blah.com"
objMessage.To = "youremail@blah.com"
objMessage.TextBody = "mach finished."
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/sendusing
") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpserver
") = "smtp.server.com"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
'objMessage.Configuration.Fields.Item _
'("
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
") = cdoBasic
'Your UserID on the SMTP server
'objMessage.Configuration.Fields.Item _
'("
http://schemas.microsoft.com/cdo/configuration/sendusername
") = "username"
'Your password on the SMTP server
'objMessage.Configuration.Fields.Item _
'("
http://schemas.microsoft.com/cdo/configuration/sendpassword
") = "password"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpserverport
") = 25
'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpusessl
") = False
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout
") = 60
objMessage.Configuration.Fields.Update
objMessage.Send
Logged
radioactive
63
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #3 on:
May 13, 2009, 10:37:02 AM »
Here's an idea...
Just mount a cellphone to the table, and at the end of your program have the spindle stop and rapid over to the phone and dial your number.
Logged
Overloaded
4,923
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #4 on:
May 13, 2009, 11:00:21 AM »
Neat idea !
Would look good on YouTube too !
Logged
Sam
987
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #5 on:
May 13, 2009, 09:26:45 PM »
HAHAHA!!! I got a good laugh outta that one. Thanks.
Logged
"CONFIDENCE: it's the feeling you experience before you fully understand the situation."
Chaoticone
5,624
Precision Chaos
Re: Any way I can get Mach to send me an email when it's finished?
«
Reply #6 on:
May 13, 2009, 09:36:03 PM »
Brett
Logged
If you could see the things I have in my head, you would be laughing too.
My guard dog is not what you need to worry about!
Print
Pages:
1
Go Up
« previous
next »