IOS: send a mail without iphone/ipad mail app

后端 未结 3 801
半阙折子戏
半阙折子戏 2021-01-20 11:39

I want to create an app that have 5 textfield and a textView:

1 - Name
2 - Surname
3 - Telephone
4 - \"your email\" (user email, not address email receiver)
         


        
3条回答
  •  没有蜡笔的小新
    2021-01-20 12:11

    This should work

    MFMailComposeViewController *mailSendingController = [MFMailComposeViewController new];
    
    [mailSendingController setSubject:@"Feedback"];
    [mailSendingController setToRecipients:[NSArray arrayWithObject:@"feedback@us.com"]];
    [mailSendingController setMessageBody:myText isHTML:NO];
    
    mailSendingController.mailComposeDelegate = self;
    
    [self presentModalViewController:mailSendingController animated:YES];
    

    where myText is a string that you make with your info

提交回复
热议问题