IOS: send a mail without iphone/ipad mail app

后端 未结 3 779
半阙折子戏
半阙折子戏 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

    0 讨论(0)
  • 2021-01-20 12:19

    for this you have to create webservice. because without this the only option is inbuilt mail method of ios

    0 讨论(0)
  • 2021-01-20 12:22

    This could be done by sending the data to a server and sending it from there. I dont see a way of sending it directly from the device without using the mail app.

    0 讨论(0)
提交回复
热议问题