Mahesh Babu
Mahesh Babu

Reputation: 3433

How to open compose mail?

I created two buttons named supportweb and email, and under these buttons I wrote the code as:

- (void) supportweb
{
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.fitzgerlad.com"]];
}

 - (void) email
{
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"[email protected]"]];
}

supportweb is opened normally, but email is not opened. What is the problem? Please help me. How can I solve this? Please post some code.

Upvotes: 0

Views: 306

Answers (1)

jtbandes
jtbandes

Reputation: 118781

The mail url format is mailto:[email protected].

But, consider using MFMailComposeViewController to send email directly in your app.

Upvotes: 1

Related Questions