# How to work with wp\_mail() function or how to work with MailHog?

**URL:** <https://community.localwp.com/t/how-to-work-with-wp-mail-function-or-how-to-work-with-mailhog/40655>\
**Category:** Support\
**Created:** [January 1, 2024, 3:00pm UTC](https://community.localwp.com/t/how-to-work-with-wp-mail-function-or-how-to-work-with-mailhog/40655 "2024-01-01T15:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ak8048](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ak8048/32/20519_2.png) [@ak8048](https://community.localwp.com/u/ak8048)\
**Post date:** [January 1, 2024, 3:00pm UTC](https://community.localwp.com/t/how-to-work-with-wp-mail-function-or-how-to-work-with-mailhog/40655/1 "2024-01-01T15:00:30Z")

</div>

### What issue or error are you experiencing?

I want to have the option to work with sending Email from my local. To work with wp\_mail(). I haven’t found any way to work with MailHog. I can just see this:

 ![CleanShot 2024-01-01 at 20.39.03@2x](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/8/a/8ac37d2c42eca4fd1304bd247d9a323a860fca6b.png)

## Anyway, to workaround to work with Email on my Local?

### What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

I have tried to find a way to work with MailHog, but I didn’t find anything useful.

From Email Log, I can see this error

 ![CleanShot 2024-01-01 at 20.58.06](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/2/3/23f23c4a6a9941536f145cccac230be374867be6.png)

## How can I change the FROM email?

### System Details

- **Local Version:**  
Version 8.2.0+6554
- **Operating System (OS) and OS version:**  
MacOS 14.2.1 (23C71)

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))

* * *

_ **Security Reminder** _  
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [January 1, 2024, 5:31pm UTC](https://community.localwp.com/t/how-to-work-with-wp-mail-function-or-how-to-work-with-mailhog/40655/2 "2024-01-01T17:31:38Z")

</div>

Hi @ak8048

Is the problem that you’re getting the Invalid Address error or some other issue?

If you need help or an alternative the links below might help:

> **[How to Receive WordPress Emails from Localhost with SMTP](https://www.wpbeginner.com/plugins/how-to-receive-wordpress-emails-from-localhost/)**
>
> Running WordPress on localhost is helpful for development and testing but email isn't enabled by default. Here's how to receive WordPress emails from localhost.

> **[How to Send WordPress Emails on Localhost With SMTP \[Easily\]](https://wpmailsmtp.com/wordpress-smtp-localhost/)**
>
> Learn the easy way to use WordPress SMTP on localhost. We'll show you how to test plugins & contact forms before publishing your site.

> [@Mailhog does not forward emails](https://community.localwp.com/t/mailhog-does-not-forward-emails/29183/3):
>
> I’ve never used it, but there does appear to be a “release” button, that is available for each message. It needs you to provide the settings for a SMTP server, but if you have that, you should be able to release individual emails from Mailhog as desired. Release button: [image] SMTP config:

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [March 31, 2024, 5:32pm UTC](https://community.localwp.com/t/how-to-work-with-wp-mail-function-or-how-to-work-with-mailhog/40655/3 "2024-03-31T17:32:14Z")

</div>

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