Send programatic email through Objective-C
In an iPhone app I'm developing, I need to send an email programmatically (read, not allowing the user to see where the email is going) similar to the P开发者_JS百科HP mail() function. Is there a way to do that?
Thanks in advance.
There's no way to do this in iPhone OS 3.0 (without jailbreaking, of course). To send email, you must use the MFMailComposeViewController.
There are some libraries that might help. Take a look http://vafer.org/blog/20080604120118. However, you'll have to provide SMTP details, which is not ideal. As Ben says you can't send a mail from the users account without going through MFMailComposeViewController
.
精彩评论