# \#laminas-mail

**URL:** https://discourse.laminas.dev/tag/laminas-mail/83.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Contenir\\Mail (formerly Laminas\\Mail)](https://discourse.laminas.dev/t/contenir-mail-formerly-laminas-mail/4158)

<div class="topic-metadata">

**Author:** [@simon-mundy](https://discourse.laminas.dev/u/simon-mundy)\
**Replies:** 1\
**Last updated:** [October 21, 2026, 2:41am UTC](https://discourse.laminas.dev/t/contenir-mail-formerly-laminas-mail/4158 "2026-10-21T02:41:31Z")

</div>

Hi everyone. I’d like to announce the pre-release version of Contenir Mail for anyone interested. As Laminas Mail was abandoned, and I actually liked using it, I set about updating it. It keeps the full Git history back…

---

## [Laminas-mail compatibility issue with php8.4](https://discourse.laminas.dev/t/laminas-mail-compatibility-issue-with-php8-4/3993)

<div class="topic-metadata">

**Author:** [@naseer](https://discourse.laminas.dev/u/naseer)\
**Replies:** 1\
**Last updated:** [February 24, 2026, 11:03am UTC](https://discourse.laminas.dev/t/laminas-mail-compatibility-issue-with-php8-4/3993 "2026-02-24T11:03:09Z")

</div>

laminas/laminas-mail\[2.25.0, …, 2.25.1\] require php ~8.1.0 || ~8.2.0 || ~8.3.0 → your php version (8.4.7) does not satisfy that requirement.

---

## [Laminas Mail with SMTP not sending mail on development server (but does send on production server)](https://discourse.laminas.dev/t/laminas-mail-with-smtp-not-sending-mail-on-development-server-but-does-send-on-production-server/3873)

<div class="topic-metadata">

**Author:** [@Jilco](https://discourse.laminas.dev/u/Jilco)\
**Replies:** 5\
**Last updated:** [March 20, 2025, 4:12pm UTC](https://discourse.laminas.dev/t/laminas-mail-with-smtp-not-sending-mail-on-development-server-but-does-send-on-production-server/3873 "2025-03-20T16:12:05Z")

</div>

There is a lot on the web, but i didn’t solve it yet. I am using laminas mail with an SMTP connection to send mail, this works fine on production server, but for testing purposed i also want to use it on my developments…

---

## [How to get sender email address when reading emails](https://discourse.laminas.dev/t/how-to-get-sender-email-address-when-reading-emails/3586)

<div class="topic-metadata">

**Author:** [@Quadri\_Abolarinwa](https://discourse.laminas.dev/u/Quadri_Abolarinwa)\
**Replies:** 1\
**Last updated:** [January 25, 2024, 9:32am UTC](https://discourse.laminas.dev/t/how-to-get-sender-email-address-when-reading-emails/3586 "2024-01-25T09:32:13Z")

</div>

I’m reading email inbox but when I try to get the from header property. I don’t see the sender’s email address. I only see the name of the sender. How do I solve this?

---

## [Laminias mail pop imap not working](https://discourse.laminas.dev/t/laminias-mail-pop-imap-not-working/3307)

<div class="topic-metadata">

**Author:** [@Bern](https://discourse.laminas.dev/u/Bern)\
**Replies:** 1\
**Last updated:** [April 19, 2023, 5:38pm UTC](https://discourse.laminas.dev/t/laminias-mail-pop-imap-not-working/3307 "2023-04-19T17:38:55Z")

</div>

Hello, Where is the error on this codes : use Laminas\\Mail\\Storage\\Pop3; require\_once 'vendor/autoload.php'; $mail = new Pop3(\[ 'host' =\> 'pop.gmail.com', 'user' =\> 'xxxxxxxx@gmail.com', 'password'…

---

## [PHP Fatal error: Cannot use ::class with dynamic class name in /home/magento/web/magento2.perfectmakeupmirrors.com/public\_html/vendor/laminas/laminas-mail/src/Message.php](https://discourse.laminas.dev/t/php-fatal-error-cannot-use-class-with-dynamic-class-name-in-home-magento-web-magento2-perfectmakeupmirrors-com-public-html-vendor-laminas-laminas-mail-src-message-php/3020)

<div class="topic-metadata">

**Author:** [@pramodraam](https://discourse.laminas.dev/u/pramodraam)\
**Replies:** 1\
**Last updated:** [August 24, 2022, 4:32pm UTC](https://discourse.laminas.dev/t/php-fatal-error-cannot-use-class-with-dynamic-class-name-in-home-magento-web-magento2-perfectmakeupmirrors-com-public-html-vendor-laminas-laminas-mail-src-message-php/3020 "2022-08-24T16:32:01Z")

</div>

When I ran the command php bin/magento s:s:d -f while upgrading Magento from 2.4.2 to 2.4.4, I get the following error. PHP Fatal error: Cannot use ::class with dynamic class name in /home/magento/web/magento2.perfectm…

---

## [getContent() isn't working as expected?](https://discourse.laminas.dev/t/getcontent-isnt-working-as-expected/2889)

<div class="topic-metadata">

**Author:** [@michaelnoby](https://discourse.laminas.dev/u/michaelnoby)\
**Replies:** 1\
**Last updated:** [May 29, 2022, 12:51pm UTC](https://discourse.laminas.dev/t/getcontent-isnt-working-as-expected/2889 "2022-05-29T12:51:12Z")

</div>

Hi, this is my working code: $mail = new Imap(\[ 'host' =\> 'mail.provider.com', 'port' =\> 993, 'user' =\> 'user@domain.com', 'password' =\> '123', 'ssl' =\> 'SSL' \]); echo $mail-\>countMessages()…

---

## [Api-Tools Skeleton has no mail? ](https://discourse.laminas.dev/t/api-tools-skeleton-has-no-mail/2431)

<div class="topic-metadata">

**Author:** [@leonardocamposprado](https://discourse.laminas.dev/u/leonardocamposprado)\
**Replies:** 1\
**Last updated:** [December 28, 2021, 6:09pm UTC](https://discourse.laminas.dev/t/api-tools-skeleton-has-no-mail/2431 "2021-12-28T18:09:07Z")

</div>

In Apigility has Zend\\Mail and Zend\\Mime in Api-Tools Skeleton no? How do I send email through Api-Tools?

---

## [What replaces Zend\_Mail\_Storage\_Maildir, or what do I install@](https://discourse.laminas.dev/t/what-replaces-zend-mail-storage-maildir-or-what-do-i-install/2621)

<div class="topic-metadata">

**Author:** [@chrisisbd](https://discourse.laminas.dev/u/chrisisbd)\
**Replies:** 4\
**Last updated:** [November 28, 2021, 11:08am UTC](https://discourse.laminas.dev/t/what-replaces-zend-mail-storage-maildir-or-what-do-i-install/2621 "2021-11-28T11:08:17Z")

</div>

I have some rather old PHP code (in a DokuWiki plugin) that I wrote to read E-Mail messages. It uses Zend\_Mail\_Storage\_Maildir. What do I need to install to provide this, or similar, functions? It’s on my own server w…

---

## [Mail log writer factory config example](https://discourse.laminas.dev/t/mail-log-writer-factory-config-example/1920)

<div class="topic-metadata">

**Author:** [@Admirau](https://discourse.laminas.dev/u/Admirau)\
**Replies:** 3\
**Last updated:** [November 15, 2021, 8:20am UTC](https://discourse.laminas.dev/t/mail-log-writer-factory-config-example/1920 "2021-11-15T08:20:57Z")

</div>

I see that there is an open issune on Github regarding missing configuration documentation for factories. Can I have and example of how to configure the Zend Log Writer Mail factory to be used with SMTP and Gmail? Here…

---

## [How do I assign a specific flag to an email? ](https://discourse.laminas.dev/t/how-do-i-assign-a-specific-flag-to-an-email/2532)

<div class="topic-metadata">

**Author:** [@Liusvani\_Suarez](https://discourse.laminas.dev/u/Liusvani_Suarez)\
**Replies:** 2\
**Last updated:** [October 13, 2021, 4:40pm UTC](https://discourse.laminas.dev/t/how-do-i-assign-a-specific-flag-to-an-email/2532 "2021-10-13T16:40:15Z")

</div>

How do I assign a specific flag to an email?

---

## [Multiple attachment with laminas-mail](https://discourse.laminas.dev/t/multiple-attachment-with-laminas-mail/2227)

<div class="topic-metadata">

**Author:** [@S\_S](https://discourse.laminas.dev/u/S_S)\
**Replies:** 1\
**Last updated:** [April 6, 2021, 6:22am UTC](https://discourse.laminas.dev/t/multiple-attachment-with-laminas-mail/2227 "2021-04-06T06:22:25Z")

</div>

Hi, I’m trying to send multiple attachment using this below code, but it’s not working. It’s sending only one file. Can you please let me know how to send multiple attachment with laminas-mail. And second problem is, m…

---

## [Laminas mail smtp - Unable to resolve service to a factory](https://discourse.laminas.dev/t/laminas-mail-smtp-unable-to-resolve-service-to-a-factory/2166)

<div class="topic-metadata">

**Author:** [@Victor\_Annunziata](https://discourse.laminas.dev/u/Victor_Annunziata)\
**Replies:** 5\
**Last updated:** [March 9, 2021, 7:06am UTC](https://discourse.laminas.dev/t/laminas-mail-smtp-unable-to-resolve-service-to-a-factory/2166 "2021-03-09T07:06:31Z")

</div>

Hi everybody, I’m new to the Zend / Laminas world so I don’t kow if this is the right question to do. I’m trying to make some testing with laminas sending e-mails via SMTP, but can’t make it work. use Laminas\\Mail\\Mess…
