# Mail failure - malformed recipient address

**URL:** <https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071>\
**Category:** Uncategorized\
**Created:** [September 20, 2023, 5:48pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071 "2023-09-20T17:48:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [September 20, 2023, 5:48pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/1 "2023-09-20T17:48:11Z")

</div>

Please help w sendmail no send emails  
see pics pls

 ![2023-09-20_134437](https://forum.hestiacp.com/uploads/default/original/2X/3/3374bbb181bb569323d1ba4c6e83a8cf47b38154.png)

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [September 20, 2023, 6:05pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/2 "2023-09-20T18:05:33Z")

</div>

I don’t know how you are sending those emails but the error is quite obvious:

`"admin@onegayplatform" <>: missing or malformed local part`

The email address should be inside `<>` and the name inside `""`, for example:

`"Admin" <admin@onegayplatform>`

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [September 20, 2023, 6:28pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/3 "2023-09-20T18:28:46Z")

</div>

th…you I see it now

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 1, 2023, 7:12pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/4 "2023-10-01T19:12:26Z")

</div>

yes, I FIX IT, but now work only my email on server AND NO SEND TO GMAIN! W PROBLEMS NOW. PLEASE HELP

 ![2023-10-01_150716](https://forum.hestiacp.com/uploads/default/original/2X/e/efe5027c60ec5d5741656c4bdaf9a15969f8e008.png)

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 1, 2023, 7:43pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/5 "2023-10-01T19:43:51Z")

</div>

Seems i misstyped it in my example, the header **from** should be:  
`"Admin <admin@onegayplatform.com>"`

Or without quotes:  
`Admin <admin@onegayplatform.com>`

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 1, 2023, 9:06pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/6 "2023-10-01T21:06:10Z")

</div>

Th…you for help see again I chenge but no work too

 ![2023-10-01_170258](https://forum.hestiacp.com/uploads/default/original/2X/6/65bfdcbe4cd97913c1e19f93a9919d785a0a6bb4.png)

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 1, 2023, 9:13pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/7 "2023-10-01T21:13:50Z")

</div>

You are including the date, content-type, etc. in **from** header and those should have their own headers. I don’t know what is the email client you are using but it is not doing a good job 😉

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 1, 2023, 9:27pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/8 "2023-10-01T21:27:12Z")

</div>

I Use the built-in mail() function

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 1, 2023, 9:37pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/9 "2023-10-01T21:37:58Z")

</div>

Sorry but built-in where? PHP?

If it is PHP, seems you are not formatting the headers correctly.

Example:

```auto
<?php
$to = "somebody@example.com, somebodyelse@example.com";
$subject = "HTML email";

$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <webmaster@example.com>' . "\r\n";

mail($to,$subject,$message,$headers);
?>

```

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 1, 2023, 11:00pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/10 "2023-10-01T23:00:24Z")

</div>

th.you but some vrong

 ![2023-10-01_185507](https://forum.hestiacp.com/uploads/default/original/2X/2/2a219ebfbbde45d869bdc6eacb1a069a3dc962bf.png)

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 2, 2023, 12:42am UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/11 "2023-10-02T00:42:15Z")

</div>

I TRY SENDMAIL USE IT

```auto
<?

$mailto = "info@mail.ru"; //ваша эл. почта

mail($mailto, "Тестовое письмо", "Sendmail работает!") or die("Ошибка");

echo "Проверяй почту";

?>

```

RESIVED MAIL - WORK SENDMAIL, NEED more work

---

<div class="post-metadata">

**Author:** ![vladimirb1](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/vladimirb1/32/3842_2.png) [@vladimirb1](https://forum.hestiacp.com/u/vladimirb1)\
**Post date:** [October 2, 2023, 6:31pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/12 "2023-10-02T18:31:11Z")

</div>

now sendmail work, but a see no english I SEE NO MY MSG  
0D=0AMessage:=0D=0Aonegayplatform.com=0D=0A=0D=0ABest

I send it

 ![2023-10-02_142135](https://forum.hestiacp.com/uploads/default/original/2X/c/c412c179097967d3010048ae8c769698081c34bc.png)  
RESIVED  
 ![2023-10-02_142344](https://forum.hestiacp.com/uploads/default/original/2X/e/e8f00243e4fe7595e47f72bd2849111d3fe11472.png)  
DRIVE ME CRAZY

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [October 2, 2023, 6:45pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/13 "2023-10-02T18:45:05Z")

</div>

Check your PHP code that sends the email…

Or use phpmailer …

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [November 1, 2023, 6:45pm UTC](https://forum.hestiacp.com/t/mail-failure-malformed-recipient-address/11071/14 "2023-11-01T18:45:09Z")

</div>

Closed on November 1, 2023, 6:45pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
