DKIM/SPF/DMARC DNS Records
meiendreschlars@gmail.com
Letzter Fehler: 550 5.0.0
Erklärung: host gmail-smtp-in.l.google.com [64.233.167.26:25] said: 5.7.26 Your
email has been blocked because the sender is
unauthenticated. 5.7.26 Gmail requires all senders to
authenticate with either SPF or DKIM. 5.7.26 5.7.26
Authentication results: 5.7.26 DKIM = did not pass
5.7.26 SPF [19squared.de] with ip: [81.169.146.220] =
did not pass 5.7.26 5.7.26 For instructions on setting
up authentication, go to 5.7.26
https://support.google.com/mail/answer/81126#authenticatio
n ffacd0b85a97d-37ee0b9b463si4513547f8f.650 - gsmtp
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from dkim import Signer
# ... (other email setup code)
# Create a DKIM signer
signer = Signer('your_private_key_path', 'your_domain.com')
# Create an email message
message = MIMEMultipart()
message['From'] = 'Sender Name <sender@example.com>'
message['To'] = 'Recipient Name <recipient@example.com>'
message['Subject'] = 'Subject'
message.attach(MIMEText('Email body'))
# Sign the message
signer.sign(message)
# Send the email
with smtplib.SMTP('smtp.example.com', 587) as smtp:
smtp.starttls()
smtp.login('your_username', 'your_password')
smtp.sendmail(message['From'], message['To'], message.as_string())
Edited by Lars Florian Meiendresch