FlyingDiver wrote:Actually, you're sending to a yahoo mail address, but you're using an ATT SMTP server, with a sbcglobal email address login. Have you confirmed that works in a regular email client?
SMTP Error 554 is a server policy denied error, which means the ATT server doesn't want to accept that message. Could be your IP address is blacklisted, or the recipient address is blacklisted, or something else entirely.
In case it's an SSL issue, you could try StartTLS on port 587.
I truly appreciate the help.
Agreed it's an AT&T server...the web client though is Yahoo! The email account is a holdover from when I had AT&T who had a partnership with Yahoo!
Using port 587 I was able to get the below code, within an Action Group, to send emails.
So the credentials w/port 587 work. However it doesn't, explain why any configuration changes were necessary, the last email my system sent was two (2) days ago, prior to upgrading. It also odd that I'm the only one having this problem.
The only other thing that is a one-off which I'll mention now, is I use a Secure Mail Key as my password for the email account. It is required when using AT&T email from a desktop program or email app without Open Authentication (OAuth). It shouldn't matter but I call it out in the event that for some reason it does in this instance.
- Code: Select all
import smtplib, ssl
from email.mime.text import MIMEText
def main():
# define email account settings
smtp_port = 587
smtp_server = "outbound.att.net"
smtp_username = "XXX@sbcglobal.net"
smtp_password = "***********"
# define the email to send
email_message = 'Hello Or any thing you want to send'
message = MIMEText(email_message)
message['From'] = 'XXX@sbcglobal.net' # smtp_username would work
message['To'] = 'XXX@yahoo.com'
# send the email
debuglevel = True # when TRUE, logs connection to server to console
mail = smtplib.SMTP(smtp_server, smtp_port)
mail.set_debuglevel(debuglevel)
mail.starttls()
mail.login(smtp_username, smtp_password)
mail.sendmail(message['From'], message['To'], message.as_string())
mail.quit()
if __name__ == '__main__':
main()