PHPMailer 550 Request failed; Mailbox unavailable

Hello
I followed the instructions but this is a confusing error
Any ideas?

Username (e.g. epiz_30054079) or Website URL

(please specify the website or account you are asking about)

Error Message

2021-11-25 14:53:40 SMTP INBOUND: “550 Request failed; Mailbox unavailable”
2021-11-25 14:53:40 SERVER → CLIENT: 550 Request failed; Mailbox unavailable
2021-11-25 14:53:40 SMTP ERROR: DATA END command failed: 550 Request failed; Mailbox unavailable
SMTP Error: data not accepted.
(please share the FULL error message you see)

Other Information

(other information and details relevant to your question)
2021-11-25 14:53:39 Connection: opening to smtp.mail.yahoo.com:587, timeout=300, options=array()
2021-11-25 14:53:39 Connection: opened
2021-11-25 14:53:39 SMTP INBOUND: “220 smtp.mail.yahoo.com ESMTP ready”
2021-11-25 14:53:39 SERVER → CLIENT: 220 smtp.mail.yahoo.com ESMTP ready
2021-11-25 14:53:39 CLIENT → SERVER: EHLO aslanmira.rf.gd
2021-11-25 14:53:39 SMTP INBOUND: “250-kubenode515.mail-prod1.omega.ir2.yahoo.com Hello aslanmira.rf.gd [185.27.134.195])”
2021-11-25 14:53:39 SMTP INBOUND: “250-PIPELINING”
2021-11-25 14:53:39 SMTP INBOUND: “250-ENHANCEDSTATUSCODES”
2021-11-25 14:53:39 SMTP INBOUND: “250-8BITMIME”
2021-11-25 14:53:39 SMTP INBOUND: “250-SIZE 41697280”
2021-11-25 14:53:39 SMTP INBOUND: “250 STARTTLS”
2021-11-25 14:53:39 SERVER → CLIENT: 250-kubenode515.mail-prod1.omega.ir2.yahoo.com Hello aslanmira.rf.gd [185.27.134.195])250-PIPELINING250-ENHANCEDSTATUSCODES250-8BITMIME250-SIZE 41697280250 STARTTLS
2021-11-25 14:53:39 CLIENT → SERVER: STARTTLS
2021-11-25 14:53:40 SMTP INBOUND: “220 2.0.0 Ready to start TLS”
2021-11-25 14:53:40 SERVER → CLIENT: 220 2.0.0 Ready to start TLS
2021-11-25 14:53:40 CLIENT → SERVER: EHLO aslanmira.rf.gd
2021-11-25 14:53:40 SMTP INBOUND: “250-kubenode515.mail-prod1.omega.ir2.yahoo.com Hello aslanmira.rf.gd [185.27.134.195])”
2021-11-25 14:53:40 SMTP INBOUND: “250-PIPELINING”
2021-11-25 14:53:40 SMTP INBOUND: “250-ENHANCEDSTATUSCODES”
2021-11-25 14:53:40 SMTP INBOUND: “250-8BITMIME”
2021-11-25 14:53:40 SMTP INBOUND: “250-SIZE 41697280”
2021-11-25 14:53:40 SMTP INBOUND: “250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER”
2021-11-25 14:53:40 SERVER → CLIENT: 250-kubenode515.mail-prod1.omega.ir2.yahoo.com Hello aslanmira.rf.gd [185.27.134.195])250-PIPELINING250-ENHANCEDSTATUSCODES250-8BITMIME250-SIZE 41697280250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER
2021-11-25 14:53:40 Auth method requested: UNSPECIFIED
2021-11-25 14:53:40 Auth methods available on the server: PLAIN,LOGIN,XOAUTH2,OAUTHBEARER
2021-11-25 14:53:40 Requested auth method not available:
2021-11-25 14:53:40 Auth method selected: LOGIN
2021-11-25 14:53:40 CLIENT → SERVER: AUTH LOGIN
2021-11-25 14:53:40 SMTP INBOUND: “334 VXNlcm5hbWU6”
2021-11-25 14:53:40 SERVER → CLIENT: 334 VXNlcm5hbWU6
2021-11-25 14:53:40 CLIENT → SERVER: YXNsYW4ubWlyYUB5YWhvby5jb20=
2021-11-25 14:53:40 SMTP INBOUND: “334 UGFzc3dvcmQ6”
2021-11-25 14:53:40 SERVER → CLIENT: 334 UGFzc3dvcmQ6
2021-11-25 14:53:40 CLIENT → SERVER: ZmNmaXF5cWhlcWhjYXp3bA==
2021-11-25 14:53:40 SMTP INBOUND: “235 2.7.0 Authentication successful”
2021-11-25 14:53:40 SERVER → CLIENT: 235 2.7.0 Authentication successful
2021-11-25 14:53:40 CLIENT → SERVER: MAIL FROM:aslan.mira@yahoo.com
2021-11-25 14:53:40 SMTP INBOUND: “250 2.1.0 Sender aslan.mira@yahoo.com OK”
2021-11-25 14:53:40 SERVER → CLIENT: 250 2.1.0 Sender aslan.mira@yahoo.com OK
2021-11-25 14:53:40 CLIENT → SERVER: RCPT TO:hugo.lujan@ymail.com
2021-11-25 14:53:40 SMTP INBOUND: “250 2.1.5 Recipient hugo.lujan@ymail.com OK”
2021-11-25 14:53:40 SERVER → CLIENT: 250 2.1.5 Recipient hugo.lujan@ymail.com OK
2021-11-25 14:53:40 CLIENT → SERVER: DATA
2021-11-25 14:53:40 SMTP INBOUND: “354 Ok Send data ending with .”
2021-11-25 14:53:40 SERVER → CLIENT: 354 Ok Send data ending with .
2021-11-25 14:53:40 CLIENT → SERVER: Date: Thu, 25 Nov 2021 17:53:39 +0300
2021-11-25 14:53:40 CLIENT → SERVER: To: Aslan Mira Store hugo.lujan@ymail.com
2021-11-25 14:53:40 CLIENT → SERVER: From: “Order Form aslan.mira@aslanmira.rf.gd” aslan.mira@yahoo.com
2021-11-25 14:53:40 CLIENT → SERVER: Reply-To: Hugo Alberto Lujan Chavez hugo.lujan@outlook.com
2021-11-25 14:53:40 CLIENT → SERVER: Subject: [Contact Form] Test Subject
2021-11-25 14:53:40 CLIENT → SERVER: Message-ID: YmKRWMWr3JMT8n55FP7k0LD8N6WOK3nQElWJyGNTA@aslanmira.rf.gd
2021-11-25 14:53:40 CLIENT → SERVER: X-Mailer: PHPMailer 6.5.0 (https://github.com/PHPMailer/PHPMailer)
2021-11-25 14:53:40 CLIENT → SERVER: MIME-Version: 1.0
2021-11-25 14:53:40 CLIENT → SERVER: Content-Type: text/plain; charset=iso-8859-1
2021-11-25 14:53:40 CLIENT → SERVER:
2021-11-25 14:53:40 CLIENT → SERVER: Name: Hugo Alberto Lujan Chavez
2021-11-25 14:53:40 CLIENT → SERVER: Email: hugo.lujan@outlook.com
2021-11-25 14:53:40 CLIENT → SERVER:
2021-11-25 14:53:40 CLIENT → SERVER: -------------------------------
2021-11-25 14:53:40 CLIENT → SERVER: Test Message
2021-11-25 14:53:40 CLIENT → SERVER:
2021-11-25 14:53:40 CLIENT → SERVER: .
2021-11-25 14:53:40 SMTP INBOUND: “550 Request failed; Mailbox unavailable”
2021-11-25 14:53:40 SERVER → CLIENT: 550 Request failed; Mailbox unavailable
2021-11-25 14:53:40 SMTP ERROR: DATA END command failed: 550 Request failed; Mailbox unavailable
SMTP Error: data not accepted.

Warning : Cannot modify header information - headers already sent by (output started at /home/vol10_2/epizy.com/epiz_30054079/htdocs/contact/vendor/phpmailer/phpmailer/src/SMTP.php:279) in /home/vol10_2/epizy.com/epiz_30054079/htdocs/contact/functions.php on line 7
Error: An error occurred while trying to send your message: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Request failed; Mailbox unavailable SMTP code: 5502021-11-25 14:53:40 CLIENT → SERVER: QUIT
2021-11-25 14:53:40 SMTP INBOUND: “221 Service Closing transmission”
2021-11-25 14:53:40 SERVER → CLIENT: 221 Service Closing transmission
2021-11-25 14:53:40 Connection: closed

Can you please copy over the code you are using to send via PHPMailer!

Googling the error message shows me other people get the same error with Yahoo:

It seems that it’s caused by using an email address that you’re not allowed to send from your Yahoo address.

I don’t see exactly which email address is the problem, I think it’s hugo.lujan@ymail.com looking at the logs, but I don’t know for sure.

2 Likes
<?php

/**

 * REQUIRED SETTINGS

 *

 * You will probably need to change all of these settings for your own site.

 * Generated app password Yahoo-PHPMail-aslan.mira@yahoo.com:HIDDEN BY MOD

 */

// The name and address which should be used for the sender details.

// The name can be anything you want, the address should be something in your own domain. It does not need to exist as a mailbox.

define('CONTACTFORM_FROM_ADDRESS', 'aslan.mira@yahoo.com');

define('CONTACTFORM_FROM_NAME', 'Order Form aslan.mira@aslanmira.rf.gd');

// The name and address to which the contact message should be sent.

// These details should NOT be the same as the sender details.

define('CONTACTFORM_TO_ADDRESS', 'hugo.lujan@ymail.com');

define('CONTACTFORM_TO_NAME', 'Aslan Mira Store');

// The details of your SMTP service, e.g. Yahoo.

define('CONTACTFORM_SMTP_HOSTNAME', 'smtp.mail.yahoo.com');

define('CONTACTFORM_SMTP_USERNAME', 'aslan.mira@yahoo.com');

define('CONTACTFORM_SMTP_PASSWORD', 'HIDDEN BY MOD');

Hidden by MOD (captcha keys)

// The debug level for PHPMailer. Default is 0 (off), but can be increased from 1-4 for more verbose logging.

define('CONTACTFORM_PHPMAILER_DEBUG_LEVEL', 4);

// Which SMTP port and encryption type to use. The default is probably fine for most use cases.

define('CONTACTFORM_SMTP_PORT', 587);

define('CONTACTFORM_SMTP_ENCRYPTION', 'tls');

hugo.lujan@ymail.com is the recipient

@aslanmira never share publicly passwords (SMTP app pass) and your secret key for ReCaptcha !

besides publish a bunch of email addresses publicly is just a call for SPAM


I edited your post and hid it
but it is best to generate new keys and app pass

4 Likes

Any ideas?

1 Like

Can you share the code you are using to actually send the email?

The code is up there in the thread :slightly_smiling_face:

This is using the standard phpmailer which is publicly available. I am just showing the config and the logs, everything else I didn’t code.

Ask Yahoo?

Yahoo’s mail servers are returning this error. The code you’re using should just work and the configuration seems fine too. Why Yahoo says that the Yahoo mail box is unavailable is something only Yahoo can say for certain.

The script was developed with Gmail, and that’s what most people are using without issues. So if you’re unable to get this resolved, maybe try a different mail provider?

4 Likes

I will try Gmail, thanks.
I will update with the resut

Now I see a different message
I am using the recommended gmail setup
define(‘CONTACTFORM_PHPMAILER_DEBUG_LEVEL’, 4);
Debug level is verbose but I don’t see any error logs:
An error occurred while trying to send your message: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Are you doing everything as we described? So:

  • Have a Gmail account
  • Have two factor authentication enabled on the account
  • Use an App Specific Password in your site configuration
  • Have CONTACTFORM_SMTP_PORT set to 587 and CONTACTFORM_SMTP_ENCRYPTION set to tls
2 Likes

Yes. I can confirm that all the setting I am used are as described in the instructions.

  • Have a Gmail account: Yes
  • Have two factor authentication enabled on the account Yes
  • Use an App Specific Password in your site configuration Yes
  • Have CONTACTFORM_SMTP_PORT set to 587 and CONTACTFORM_SMTP_ENCRYPTION set to tls

define(‘CONTACTFORM_SMTP_PORT’, 587);
define(‘CONTACTFORM_SMTP_ENCRYPTION’, ‘tls’);

Is your SMTP hostname set to smtp.gmail.com?

Yes, it is :slightly_smiling_face: