mirror of
https://github.com/ookangzheng/blahdns.git
synced 2025-12-16 22:25:37 +07:00
Site update and added Feedback page
This commit is contained in:
22
website/feedback/send_mail.py
Executable file
22
website/feedback/send_mail.py
Executable file
@@ -0,0 +1,22 @@
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
|
||||
def send_mail(customer, email, rating, comments):
|
||||
port = 2525
|
||||
smtp_server = ''
|
||||
login = ''
|
||||
password = ''
|
||||
message = f""
|
||||
|
||||
sender_email = ''
|
||||
receiver_email = ""
|
||||
msg = MIMEText(message, 'html')
|
||||
msg['Subject'] = f"{customer} -- Blahdns feedback"
|
||||
msg['From'] = ''
|
||||
msg['To'] = ''
|
||||
|
||||
# Send email
|
||||
with smtplib.SMTP(smtp_server, port) as server:
|
||||
server.login(login, password)
|
||||
server.sendmail(sender_email, receiver_email, msg.as_string())
|
||||
Reference in New Issue
Block a user