# 플러그인에서 이메일 주소로 PM 보내기

**URL:** <https://meta.discourse.org/t/send-pm-to-an-email-adress-from-a-plugin/280702>\
**Category:** Development\
**Created:** [10월 2, 2023, 6:06오전 UTC](https://meta.discourse.org/t/send-pm-to-an-email-adress-from-a-plugin/280702 "2023-10-02T06:06:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [10월 2, 2023, 10:52오전 UTC](https://meta.discourse.org/t/send-pm-to-an-email-adress-from-a-plugin/280702/4 "2023-10-02T10:52:11Z")

</div>

요약: `target_recipients`가 아니라 `target_emails`를 사용하세요.

`target_recipients`는 `PostCreator`의 인수가 아니라 `PostsController`의 매개변수입니다.  
해당 컨트롤러는 수신자가 사용자, 그룹, 이메일 주소 중 무엇인지 [판단한 뒤](https://github.com/discourse/discourse/blob/2ec7455c89d8bdb60b8cb46a6bb7b55ba8c1d706/app/controllers/posts_controller.rb#L894-L906) 최종적으로 `NewPostsManager`에 `target_emails`로 전달하며, 이는 `TopicCreator`에 [도달하게 됩니다](https://github.com/discourse/discourse/blob/5a904949b277f5cb85be4b4a2d40b34fec8ee3da/lib/topic_creator.rb#L218-L220).

---

_[View the full topic](https://meta.discourse.org/t/send-pm-to-an-email-adress-from-a-plugin/280702)._
