how to backgroundly send mail form my app?

1 view
Skip to first unread message

norman

unread,
Aug 10, 2008, 8:06:18 PM8/10/08
to iPhoneOSCoders
Hello everyone,
does anyone know how to backgroundly send mail form my app?
I want to provide a function kind like email notification triggerd if
something happened.
is that possible?

thanks~

norman

Steve Shi

unread,
Aug 11, 2008, 12:04:23 AM8/11/08
to iphoneo...@googlegroups.com
I have briefly explored this topic but it seems the answer is there is no direct way to send email from the app. Although you can do the following:

-(void) sendEmail {
  NSURL* mailURL = [NSURL URLWithString: @"mailto:f...@example.com?cc=b...@example.com&subject=Greetings%20from%Cupertino!&body=Wish%20you%20were%20here!"];
  [[UIApplication sharedApplication] openURL: mailURL];
}

your app will quit to give way to the iPhone email app.
Reply all
Reply to author
Forward
0 new messages