Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Form error: Email "" does not comply with addr-spec of RFC 2822

form

Started by Serge L 2 years ago · 1 replies · 834 views
2 years ago

Hello, my clients have recently reported an error on my Grav website that does not allow them to submit a form. I have tested it and get the following error:

Symfony \ Component \ Mime \ Exception \ RfcComplianceException
Email "" does not comply with addr-spec of RFC 2822.

Previously everything was working fine. Here are some additional details.

/home4/empirage/public_html/user/plugins/email/vendor/symfony/mime/Address.php

PHP
private static $encoder;

private $address;
private $name;

public function __construct(string $address, string $name = '')
{
    if (!class_exists(EmailValidator::class)) {
        throw new LogicException(sprintf('The "%s" class cannot be used as it needs "%s"; try running "composer require egulias/email-validator".', __CLASS__, EmailValidator::class));
    }

    if (null === self::$validator) {
        self::$validator = new EmailValidator();
    }

    $this->address = trim($address);
    $this->name = trim(str_replace(["\n", "\r"], '', $name));

    if (!self::$validator->isValid($this->address, class_exists(MessageIDValidation::class) ? new MessageIDValidation() : new RFCValidation())) {
        throw new RfcComplianceException(sprintf('Email "%s" does not comply with addr-spec of RFC 2822.', $address));
    }
}

public function getAddress(): string
{
    return $this->address;
}

public function getName(): string
{
    return $this->name;
}

public function getEncodedAddress(): string
{
    if (null === self::$encoder) {
        self::$encoder = new IdnAddressEncoder();
    }

    return self::$encoder->encodeString($this->address);

Arguments

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

Environment & details:
GET Data empty
POST Data
data

array:7 [▶]

form-name

"contact-form"

unique_form_id

"rvqyx0nf8dasoolegnkb"

form-nonce

"60d032cee094d5f8976b264364f783ad"

Files empty
Cookies
grav-site-8472609-admin

"16993c63e637d0574f2e1f6e9265d923"

grav-site-8472609

"d8bfd8575ca8691dc98ddb3d8705d8f3"

Session
redirect_after_login

"/contact"

user

Grav\Common\User\User {#133}

messages

Grav\Framework\Session\Messages {#135}

basic_captcha_code

"1a0781"

Server/Request Data
LSPHP_ENABLE_USER_INI

"on"

PATH

"/usr/local/bin:/usr/bin:/bin"

TEMP

"/tmp"

TMP

"/tmp"

TMPDIR

"/tmp"

PWD

"/"

HTTP_ACCEPT

"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8"

HTTP_ACCEPT_ENCODING

"gzip, deflate, br, zstd"

HTTP_ACCEPT_LANGUAGE

"en-GB,en;q=0.5"

HTTP_CONNECTION

""

CONTENT_TYPE

"multipart/form-data; boundary=---------------------------279391762542578112474043651776"

CONTENT_LENGTH

"1406"

HTTP_COOKIE

"grav-site-8472609-admin=16993c63e637d0574f2e1f6e9265d923; grav-site-8472609=d8bfd8575ca8691dc98ddb3d8705d8f3"

HTTP_HOST

"empirelanguage.com"

HTTP_REFERER

"https://empirelanguage.com/contact"

HTTP_USER_AGENT

"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0"

HTTP_X_FORWARDED_FOR

"103.137.15.20"

HTTP_ORIGIN

"https://empirelanguage.com"

HTTP_UPGRADE_INSECURE_REQUESTS

"1"

HTTP_SEC_FETCH_DEST

"document"

HTTP_SEC_FETCH_MODE

"navigate"

HTTP_SEC_FETCH_SITE

"same-origin"

HTTP_SEC_FETCH_USER

"?1"

HTTP_PRIORITY

"u=1"

HTTP_TE

"trailers"

HTTP_X_REAL_IP

"103.137.15.20"

HTTP_X_EIG_ORIGIN

"50.87.146.91"

HTTP_X_HTTPS

"1"

REDIRECT_UNIQUE_ID

"ZmvcXvpCi5_ShEonFVfn3wAALl4"

REDIRECT_QS_ConnectionId

"171834479879816870695392"

REDIRECT_SCRIPT_URL

"/contact"

REDIRECT_SCRIPT_URI

"https://empirelanguage.com/contact"

REDIRECT_no-proxy

"1"

REDIRECT_HTTPS

"on"

REDIRECT_SSL_TLS_SNI

"empirelanguage.com"

REDIRECT_HTTP2

"on"

REDIRECT_H2PUSH

"on"

REDIRECT_H2_PUSH

"on"

REDIRECT_H2_PUSHED

""

REDIRECT_H2_PUSHED_ON

""

REDIRECT_H2_STREAM_ID

"15"

REDIRECT_H2_STREAM_TAG

"695392-340-15"

REDIRECT_STATUS

"200"

UNIQUE_ID

"ZmvcXvpCi5_ShEonFVfn3wAALl4"

QS_ConnectionId

"171834479879816870695392"

SCRIPT_URL

"/contact"

SCRIPT_URI

"https://empirelanguage.com/contact"

no-proxy

"1"

HTTPS

"on"

SSL_TLS_SNI

"empirelanguage.com"

HTTP2

"on"

H2PUSH

"on"

H2_PUSH

"on"

H2_PUSHED

""

H2_PUSHED_ON

""

H2_STREAM_ID

"15"

H2_STREAM_TAG

"695392-340-15"

SERVER_SIGNATURE

""

SERVER_SOFTWARE

"Apache"

SERVER_NAME

"empirelanguage.com"

SERVER_ADDR

"50.87.146.91"

SERVER_PORT

"443"

REMOTE_ADDR

"103.137.15.20"

DOCUMENT_ROOT

"/home4/empirage/public_html"

REQUEST_SCHEME

"https"

CONTEXT_PREFIX

""

CONTEXT_DOCUMENT_ROOT

"/home4/empirage/public_html"

SERVER_ADMIN

"[email protected]"

SCRIPT_FILENAME

"/home4/empirage/public_html/index.php"

REMOTE_PORT

"35498"

REDIRECT_URL

"/contact"

SERVER_PROTOCOL

"HTTP/2.0"

REQUEST_METHOD

"POST"

QUERY_STRING

""

REQUEST_URI

"/contact"

SCRIPT_NAME

"/index.php"

PHP_SELF

"/index.php"

REQUEST_TIME_FLOAT

1718344798.8157

REQUEST_TIME

1718344798

argv

[]

argc

0

Environment Variables empty
Registered Handlers

  1. Whoops\Handler\PrettyPageHandler
  2. Whoops\Handler\CallbackHandler
last edited 06/14/24 by Serge L
2 years ago

I've no idea what this quoted wall of text is, but error clearly says you have an empty email string somewhere

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 54 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago