我已经设置了InAppSettingsKit来发送这样的电子邮件:
<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>
我尝试过不同的方法来填充IASKMailComposeToRecipents中的电子邮件地址,但是还没有找到解决方法来解决这个问题。
我认为会是这样的,但这无法显示电子邮件地址:
<array><string>bill@email.com</string></array>
对此有何帮助?
答案 0 :(得分:2)
这应该有效:
<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>
请注意,模拟器不支持MFMailComposeViewController
,因此请务必在设备上对此进行测试。