title: Add recipient in MFMailComposeViewController from Label represented
body: <p>I have an application that allows users to send emails by MFMailcomposeViewController.</p>
  <pre><code>composeVC.setToRecipients([&quot;email@gmail.com&quot;]) 
  </code></pre>
  <p>In the same view controller i have a label which is representing the email of the people which is downloaded from Firestore. How can i <code>setToRecipients</code> instead of (<code>[&quot;email@gmail.com&quot;]</code>) to (<code>[&quot;mailRepresentedLabel@gmail.com&quot;]</code>)</p>
  <p>I want it to pull the data from mail represented label and add it automatically to the recipient so the end user is not required to add the email to setToRecipient it will be automatically pulled from mailRepresentedLabel</p>
  <p>Please help.</p>
  <p>My current code is look like this</p>
  <pre><code>               if !MFMailComposeViewController.canSendMail() {
                     print(&quot;Не удается отправить Имэйл&quot;)
                     return
                 }
                 let composeVC = MFMailComposeViewController()
                 composeVC.mailComposeDelegate = self
                  
                 // Configure the fields of the interface.
          composeVC.setToRecipients([&quot;\(String(describing: mailRepLabel))&quot;])
                 composeVC.setSubject(&quot;Register your client details with us&quot;)
                 composeVC.setMessageBody(&quot;Dear agent please register your client with us by replying on that email in order for us to track the information that this client is came with you. if aftersometime the client would like to come without you we will always have the information that this client is came with you and we will send him back to you. Please reply with the following details: Client Name, Passport number Property Managers name.&quot;, isHTML: false)
                  
                 // Present the view controller modally.
                 self.present(composeVC, animated: true, completion: nil)
                 print(&quot;done&quot;)
             }
      
  }
  
  extension AgentViewController: MFMailComposeViewControllerDelegate {
      func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
          if let _ = error {
              controller.dismiss(animated: true)
          
          return
          
          }
          switch result {
          case .cancelled:
              print(&quot;Canceled&quot;)
          case.failed:
              print(&quot;Failed to send&quot;)
          case.saved:
              print(&quot;Saved&quot;)
          case.sent:
              print(&quot;Email Sent&quot;)
          }
          controller.dismiss(animated: true)
      }
  }```
  </code></pre>