Its possible that claymore bat send a email to me when miner stopped?
Thanks
You can execute .bat file in EthMan when miner stopped/disconnected/overheated or its hashrate is low. Probably you can send email from .bat.
Miner itself cannot send email, use pool for it.
Could anyone help here? I'd like to send myself an email from .bat file, but the hint here was "probably you can send", so anyone would give an definite answer if this can be done or perfectly publish a code for .bat file?
The easiest way probably is to use smtplib in python.
def send_email(user, pwd, recipient, subject, body):
gmail_user = user
gmail_pwd = pwd
FROM = user
TO = recipient if type(recipient) is list else [recipient]
SUBJECT = subject
TEXT = body
# Prepare actual message
message = """\From: %s\nTo: %s\nSubject: %s\n\n%s
""" % (FROM, ", ".join(TO), SUBJECT, TEXT)
try:
server = smtplib.SMTP("smtp.gmail.com", 587)
server.ehlo()
server.starttls()
server.login(gmail_user, gmail_pwd)
server.sendmail(FROM, TO, message)
server.close()
print("successfully sent email to: " + recipient +
" on " + datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
except:
print("failed to send mail")