我已导入框架,用于从后台应用程序发送电子邮件,即SKPSMTPMessageFramework.有人可以建议为什么会出现以下错误
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in ConfirmController.o
"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o
"_kSKPSMTPPartMessageKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o
"_kSKPSMTPPartContentTypeKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
采取框架的来源: -
锁定MFMailComposeViewController中的字段
更新:
答:只需将文件夹拖放到项目上,然后单击复制即可.多数民众赞成也选择项目复选框和目标复选框.
我想使用swift来实现应用内电子邮件.单击该按钮时,会弹出电子邮件窗口.但是,我无法发送电子邮件.此外,点击取消删除草稿后,我无法返回到原始屏幕.
import UIkit
import MessageUI
class Information : UIViewController, MFMailComposeViewControllerDelegate{
var myMail: MFMailComposeViewController!
@IBAction func sendReport(sender : AnyObject) {
if(MFMailComposeViewController.canSendMail()){
myMail = MFMailComposeViewController()
//myMail.mailComposeDelegate
// set the subject
myMail.setSubject("My report")
//To recipients
var toRecipients = ["lipeilin@gatech.edu"]
myMail.setToRecipients(toRecipients)
//CC recipients
var ccRecipients = ["tzhang85@gatech.edu"]
myMail.setCcRecipients(ccRecipients)
//CC recipients
var bccRecipients = ["tzhang85@gatech.edu"]
myMail.setBccRecipients(ccRecipients)
//Add some text to the message body
var sentfrom = "Email sent from my app"
myMail.setMessageBody(sentfrom, isHTML: true)
//Include an attachment
var image = UIImage(named: "Gimme.png")
var imageData = …Run Code Online (Sandbox Code Playgroud) 在iPhone应用程序中,我想向忘记密码的人发送电子邮件.我想在后台发送邮件(不能使用MFMailComposeViewController),也不能将应用程序推送到后台.有没有办法实现这个目标?
Iphone sdk:如何从iphone应用程序发送背景信息.
根据用户做出的某些选择,我想触发一个事件来向管理员发送电子邮件.
我知道MFMailComposeViewController,但这将打开我想跳过的邮件编辑器窗口.
我需要我的应用程序可以自动发送消息而无需用户交互.
这个有可能?我读了一些关于smslib但是是用java开发的.
苹果是否接受了这样做的框架?
谢谢你提前的时间......
我正在使用 MFMailComposeViewController 发送带有附件的电子邮件。在所有指南中,它选择将视图控制器呈现为模态视图,以便用户可以更改字段并选择发送或取消。
我不希望人们能够更改我输入的信息,所以我想知道是否可以强制它发送电子邮件而不进入模态视图?
我知道将 url 与 mailto 一起使用,但相信您无法添加附件。
如果有人知道这是否可行,或者如果他们知道如何做甚至更好,我将非常感谢您的帮助。
非常感谢。
email ×3
ios ×3
iphone ×3
xcode ×2
attachment ×1
background ×1
ios5 ×1
mfmailcomposeviewcontroller ×1
objective-c ×1
swift ×1