adding more debuging
This commit is contained in:
parent
2de4d54360
commit
3aca69e84e
@ -1,7 +1,7 @@
|
||||
"""
|
||||
title: Send Email
|
||||
author: Josh Knapp
|
||||
version: 0.2.0
|
||||
version: 0.4.0
|
||||
description="Send email via SMTP to user specificed address"
|
||||
"""
|
||||
|
||||
@ -9,7 +9,7 @@ import subprocess, sys
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# Try to import boto3, install if not present
|
||||
# Try to import required packages, install if not present
|
||||
try:
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
@ -58,6 +58,7 @@ class Tools:
|
||||
|
||||
def __init__(self):
|
||||
self.valves = self.Valves()
|
||||
print(f"Debug Status {self.valves.DEBUG}")
|
||||
pass
|
||||
|
||||
def send_email(self, to_address: str, subject: str, message: str) -> dict:
|
||||
@ -72,6 +73,8 @@ class Tools:
|
||||
Returns:
|
||||
dict: Response containing success status and message
|
||||
"""
|
||||
if self.valves.DEBUG:
|
||||
print("Debug activated, sending email...")
|
||||
try:
|
||||
# Create message container
|
||||
msg = MIMEMultipart()
|
||||
|
Loading…
Reference in New Issue
Block a user