Laravel

Email does not comply with addr-spec of RFC 2822. Laravel

This error message indicates that the email address you’re attempting to use doesn’t adhere to the specific formatting guidelines outlined in RFC 2822. This RFC is a fundamental standard for email addresses, defining the correct syntax and structure.

Common Reasons for Non-Compliance:

  1. Missing or Incorrect ‘@’ Symbol: The ‘@’ symbol separates the local part (the username) from the domain part (the email provider). Its absence or incorrect placement is a common cause of this error.
  2. Invalid Local Part: The local part can contain letters (both uppercase and lowercase), numbers, underscores, hyphens, and periods. However, it cannot start or end with a period, and consecutive periods are not allowed.
  3. Invalid Domain Part: The domain part typically consists of one or more domain names separated by periods. Each domain name should adhere to specific rules, such as not starting or ending with a hyphen.
  4. Whitespace or Special Characters: Email addresses should not contain any whitespace characters (spaces, tabs, etc.) or special characters (except those allowed in the local and domain parts).
  5. Case Sensitivity: While email addresses are generally case-insensitive, some systems might be more strict about case. Ensure that the case of the characters matches the expected format.

Example of a Valid Email Address:

john.doe@example.com

 

Example of an Invalid Email Address:

john doe@example.com  // Missing '@' and whitespace
john..doe@example.com // Invalid local part with consecutive periods
example@ // Missing domain part

 

Troubleshooting Steps:

  1. Double-check the Email Address: Carefully review the email address for any typos, missing characters, or incorrect formatting.
  2. Consult RFC 2822: If you need more detailed information, refer to the RFC 2822 specification.
  3. Use an Online Validation Tool: There are many online tools available that can validate email addresses based on RFC 2822.

By addressing these common issues and following the guidelines in RFC 2822, you can ensure that your email addresses are valid and compliant.

Simple solution to fix this issue is:
make array of multiple emails like below:

$emails = [‘info@basantmallick.com’, ‘test@gmail.com’];
this issue comes when we want to add multiple email ids for receiving emails.
Hope you Understand.

Basant

Recent Posts

How to get the value of selected radio button using jQuery

Just use below code and modified according to your need. Note: this is very useful…

2 months ago

AWS

Steps: AWS puttyubuntu sudo su apt update apt install apache2 service apache2 start service apache2…

6 months ago