1

I have set up InAppSettingsKit to send an e-mail like this:

<dict>
    <key>DefaultValue</key>
    <string></string>
    <key>IASKMailComposeToRecipents</key>
    <array/>
    <key>IASKMailComposeBody</key>
    <string></string>
    <key>IASKMailComposeBodyIsHTML</key>
    <string>NO</string>
    <key>IASKMailComposeSubject</key>
    <string>Subject title</string>
    <key>Title</key>
    <string>Title</string>
    <key>Type</key>
    <string>IASKMailComposeSpecifier</string>
</dict>

I have tried different ways to populate the e-mail address in IASKMailComposeToRecipents, but have not found a solution for how to do that.

I thought is would be something like this, but this fails to bring up the e-mail address:

<array><string>bill@email.com</string></array>

Any help on this one?

modusCell
  • 13,151
  • 9
  • 53
  • 80
Espen
  • 110
  • 8

1 Answers1

2

This should work:

<dict>
    <key>IASKMailComposeToRecipents</key>
    <array>
            <string>bill@email.com</string>
    </array>
    <key>IASKMailComposeBody</key>
    <string>body</string>
    <key>IASKMailComposeBodyIsHTML</key>
    <false/>
    <key>IASKMailComposeSubject</key>
    <string>Subject title</string>
    <key>Title</key>
    <string>Title</string>
    <key>Type</key>
    <string>IASKMailComposeSpecifier</string>
</dict>

Note that the Simulator doesn't support MFMailComposeViewController so make sure to test this on the device.

Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213