Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8030229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:41:57+00:00 2026-06-05T00:41:57+00:00

I am making an application where I want to send an email using smtp

  • 0

I am making an application where I want to send an email using smtp server.

It’s working fine but if user does not provide the correct gmail account details such as (email id and password) email is not send.

What I want to do is I want to access user gmail account details from setting tab of the iPhone into my app?

Is it possible to do retrieve the gmail account detail into the app?

Please help me out with this.

Following is my code:

-(IBAction)sendemail
{
    SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
    //testMsg.fromEmail = @"Lexi mobile";//nimit51parekh@gmail.com
    testMsg.fromEmail = soundOn;
    NSLog(@"str_Uname=%@",testMsg.fromEmail);
    //str_info = [str_info stringByReplacingOccurrencesOfString:@"," withString:@""];
    testMsg.toEmail = [string_emailinfo objectAtIndex:0];
    NSLog(@"autoemail=%@",testMsg.toEmail);
    testMsg.relayHost = @"smtp.gmail.com";
    testMsg.requiresAuth = YES;
    testMsg.login = soundOn;
    NSLog(@"autoelogin=%@",testMsg.login);
    testMsg.pass = vibrateOn;
    NSLog(@"autopass=%@",testMsg.pass);
    testMsg.subject = @"Photo Sharing";
    testMsg.wantsSecure = YES; 

    NSURL *url = [[NSURL alloc]initWithString:@"http://itunes.apple.com/us/app/umix-radio/id467041430?mt=8"];
    NSString *msg2 = [NSString stringWithFormat:@"<html><b><a href=\"%@\">DOWNLOAD NOW</a></b>&nbsp&nbsp<a href=\"http://itunes.apple.com/us/app/umix-radio/id467041430?mt=8\"></a></html>",url];
    NSString *sendmsg=[[NSString alloc]initWithFormat:@"%@",msg2];
    NSLog(@"automsg=%@",sendmsg);

    testMsg.delegate = self;

    NSDictionary *plainPart = [NSDictionary dictionaryWithObjectsAndKeys:@"text/plain",kSKPSMTPPartContentTypeKey,
                                                            sendmsg,kSKPSMTPPartMessageKey,@"8bit",kSKPSMTPPartContentTransferEncodingKey,nil];

    testMsg.parts = [NSArray arrayWithObjects:plainPart,nil];
    [testMsg send];

    // [self DeleteRowAfterSending];
    //[self performSelector:@selector(DeleteRowAfterSending) withObject:nil afterDelay:5.0];
}

-(void)messageSent:(SKPSMTPMessage *)message
{
    [message release];

    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Success" message:@"Your email is sent successfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [alert show];
    [alert release];

    NSLog(@"delegate - message sent");
}

-(void)messageFailed:(SKPSMTPMessage *)message error:(NSError *)error
{
    [message release];

    // open an alert with just an OK button
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Fail" message:@"Message sending failure" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [alert show];
    [alert release];

    NSLog(@"delegate - error(%d): %@", [error code], [error localizedDescription]);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:42:00+00:00Added an answer on June 5, 2026 at 12:42 am

    What i want to do is i want to access user gamil account details from
    setting tab of the iPhone into my app? is it possible to do retrive
    the gamil account detail into the app?

    No, and with good reason: that functionality would allow any developer access to anyone’s e-mail account.

    That would be a massive security hole.

    Much like it is with Location Services, you’re just going to have to ask the user to enter their e-mail address and password. And hope they want to trust your app with that kind of personal information. (Assuming Apple approves your app at all.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am making an email application,where user can set his time to send email?
I'm making an application using Quickly, and I want to add a Webkit widget
i am making a application in which user enter a date when he want
I'm making a simple client server chat application. I want to be able to
I am making an application in silverlight 3.0 In that application i want to
I making an application with my own keyboard and I want to completely DISABLE
I am making an application that I dont want it to close. So on
I am making an application in Java and I want to allow users to
I'm making chat application and read messages data from SQLite database. I want to
Hi I want to try making a simple application for android phones for which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.