When you try to upload or create a first-generation (1GP) managed package in Salesforce, it fails with the following error:
Contact email needs to be in a valid email format
This error message may not always be displayed to the customer. In that case, an error code in the following format may be shown when the package upload or creation fails:
XXXXXXXX-XXXXXX (-153744788)
The "Contact Email" field on the connected apps included in the package may appear to contain a valid email address, but it can become internally invalid, often as a result of an org migration or similar event. Validation then rejects it during package upload or creation.
This article explains how to fix the Salesforce error "Contact email needs to be in a valid email format" that blocks a 1GP managed package upload or creation, by re-saving the Contact Email on every connected app included in the package.
Perform the following steps for every connected app included in the package.
This resets the field's internal state so that it passes validation successfully. If the package contains multiple connected apps, repeat these steps for each one.
005459318

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.