Send Email Error |To address will be role or it should be mail id

Traceback with variables (most recent call last):
File “apps/frappe/frappe/utils/background_jobs.py”, line 175, in execute_job
retval = method(**kwargs)
site = ‘turiyatree.in’
method = <function send_mail at 0x7fa4d41f2710>
event = None
job_name = ‘email_queue_sendmail_161’
kwargs = {‘email_queue_name’: 161, ‘is_background_task’: True}
user = ‘Administrator’
is_async = True
retry = 0
retval = None
method_name = ‘send_mail’
before_job_task = ‘frappe.monitor.start’
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 186, in send_mail
record.send(is_background_task=is_background_task, smtp_server_instance=smtp_server_instance)
email_queue_name = 161
is_background_task = True
smtp_server_instance = None
record = <EmailQueue: 161>
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 143, in send
ctx.smtp_session.sendmail(from_addr=self.sender, to_addrs=recipient.recipient, msg=message)
self = <EmailQueue: 161>
is_background_task = True
smtp_server_instance = None
ctx = <frappe.email.doctype.email_queue.email_queue.SendMailContext object at 0x7fa4cea4cc70>
message = b’Content-Type: multipart/mixed; boundary=“===============8988754654447896852==”\r\nMIME-Version: 1.0\r\nisnotification: \r\nMessage-Id: 170080905554.163873.2310113499767190513@turiyatree.in\r\nX-Original-From: Team Turiyatree team@turiyatree.com\r\nSubject: Payment Confirmation\r\nFrom: Team Turiyatree team@turiyatree.com\r\nTo: Guest\r\nDate: Fri, 24 Nov 2023 06:57:35 -0000\r\nReply-To: team@turiyatree.com\r\nX-Frappe-Site: https://turiyatree.in\r\n\r\n–===============8988754654447896852==\r\nContent-Type: multipart/alternative;\r\n boundary=“===============2738679739116787567==”\r\nMIME-Version: 1.0\r\n\r\n–===============2738679739116787567==\r\nContent-Type: text/plain; charset=“utf-8”\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nHello,\r\n\r\nYour payment was successful. Thank you for your purchase.\r\n\r\n PhonePe | India's Payments App
recipient = <EmailQueueRecipient: 9b640e75cf parent=161>
method = None
File “/usr/lib/python3.10/smtplib.py”, line 901, in sendmail
raise SMTPRecipientsRefused(senderrs)
self = <smtplib.SMTP_SSL object at 0x7fa4cea0d8a0>
from_addr = ‘Team Turiyatree team@turiyatree.com
**

to_addrs = [‘Guest’]

**
msg = b’Content-Type: multipart/mixed; boundary=“===============8988754654447896852==”\r\nMIME-Version: 1.0\r\nisnotification: \r\nMessage-Id: 170080905554.163873.2310113499767190513@turiyatree.in\r\nX-Original-From: Team Turiyatree team@turiyatree.com\r\nSubject: Payment Confirmation\r\nFrom: Team Turiyatree team@turiyatree.com\r\nTo: Guest\r\nDate: Fri, 24 Nov 2023 06:57:35 -0000\r\nReply-To: team@turiyatree.com\r\nX-Frappe-Site: https://turiyatree.in\r\n\r\n–===============8988754654447896852==\r\nContent-Type: multipart/alternative;\r\n boundary=“===============2738679739116787567==”\r\nMIME-Version: 1.0\r\n\r\n–===============2738679739116787567==\r\nContent-Type: text/plain; charset=“utf-8”\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nHello,\r\n\r\nYour payment was successful. Thank you for your purchase.\r\n\r\n PhonePe | India's Payments App
mail_options = ()
rcpt_options = ()
esmtp_opts = [‘size=5603’]
code = 553
resp = b’5.1.3 The recipient address is not a valid RFC 5321 address. Please\n5.1.3 visit\n5.1.3 About SMTP error messages - Google Workspace Admin Help and review RFC 5321\n5.1.3 specifications for more information. b24-20020aa78718000000b0068fece22469sm502512pfo.4 - gsmtp’
senderrs = {‘Guest’: (553, b’5.1.3 The recipient address is not a valid RFC 5321 address. Please\n5.1.3 visit\n5.1.3 About SMTP error messages - Google Workspace Admin Help and review RFC 5321\n5.1.3 specifications for more information. b24-20020aa78718000000b0068fece22469sm502512pfo.4 - gsmtp’)}
each = ‘Guest’
smtplib.SMTPRecipientsRefused: {‘Guest’: (553, b’5.1.3 The recipient address is not a valid RFC 5321 address. Please\n5.1.3 visit\n5.1.3 About SMTP error messages - Google Workspace Admin Help and review RFC 5321\n5.1.3 specifications for more information. b24-20020aa78718000000b0068fece22469sm502512pfo.4 - gsmtp’)}

How to solve this and make it work. Please help any one thankyou
@buildwithhussain @mohsininspire @avc

Hi @Ramki_Marichamy :

Could you ellaborate the question ?..

Seems you are trying to send an email to an incorrect email address …
Look at Email Queue.

Hi sir,
thankyou for your response.
I got of error logs regarding mail, But it stopped automatically
If it again came i will ask you in full detail

1 Like