Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Mobile-Applications iphone mail sending problem

Have Programming Question? Ask it here!
 
 
 


Java Coder
iphone mail sending problem
1 Answer(s)      3 years and 7 months ago
Posted in : MobileApplications


Hi, I'm receiving the following error ... while sending mail in my iphone application

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[viewController keyboardWasShown:]: unrecognized selector sent to instance 0x1baa20'

any idea .. why i'm getting this error and to solve it?

Thanks in Advance!


Advertisement
View Answers

December 22, 2010 at 2:48 PM


Hi all, I get it done myself... actually in my send mail code i have predefined the mailto id as well as cc and bcc.. and was changing it at the run time that was giving me the NSInvalidArgumentException. Now as i have changed and left it blank to enter the mail to id at runtime it is working perfectly.

Previous Code:

-(void)displayComposerSheet 
{
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;

    [picker setSubject:@"Hello from California!"];


    // Set up recipients
    NSArray *toRecipients = [NSArray arrayWithObject:@"first@example.com"]; 
    NSArray *ccRecipients = [NSArray arrayWithObjects:@"second@example.com", @"third@example.com", nil]; 
    NSArray *bccRecipients = [NSArray arrayWithObject:@"fourth@example.com"]; 

    [picker setToRecipients:toRecipients];
    [picker setCcRecipients:ccRecipients];  
    [picker setBccRecipients:bccRecipients];

    // Attach an image to the email
    NSString *path = [[NSBundle mainBundle] pathForResource:@"rainy" ofType:@"png"];
    NSData *myData = [NSData dataWithContentsOfFile:path];
    [picker addAttachmentData:myData mimeType:@"image/png" fileName:@"rainy"];

    // Fill out the email body text
    NSString *emailBody = @"It is raining in sunny California!";
    [picker setMessageBody:emailBody isHTML:NO];

    [self presentModalViewController:picker animated:YES];
    [picker release];
}

Now, Set up recipients is left blank in the new code. that works fine. Thanks!



Related Tutorials/Questions & Answers:
iphone mail sending problem
iphone mail sending problem  Hi, I'm receiving the following error ... while sending mail in my iphone application Terminating app due to uncaught... it done myself... actually in my send mail code i have predefined the mailto id
sending mail - JSP-Servlet
sending mail  Hi, what is the code for sending mail automatically without user intervention? thanks in advance
Advertisements
sending mail using jsp
sending mail using jsp  please give me the detailed procedure and code for sending mail through jsp program   Please visit the following links: http://www.roseindia.net/ejb/introduction/j2eedemo.shtml http
java mail sending with images
java mail sending with images  I need to send images through java mail without giving content path(i.e. we don't want hard code the image path)can you tell me the idea?   Please visit the following links: http
sending a mail - JSP-Servlet
sending a mail   I m writing a code for send mail in jsp,i sending a mail to specified receiver but if i attach an file and send a mail then i m getting an error. Here Attachment is in String[] Attachment=null so how
Sending mail - JavaMail
Sending mail  Need a simple example of sending mail in Java  Hi,To send email you need a local mail server such as apache james. You first download apache james mail server and install on the local network.Then create
Sending images through java mail
and by clicking one image the control go to mail sending page in that the image should add to body part and the mail will sent to recipients..... please give me any idea...Sending images through java mail  Am trying to develop greeting
Sending mail (Contact Form in a website)
Sending mail (Contact Form in a website)  Hi, I just uploaded few of my webpages into a free web hosting service, where i can just upload the web pages. Am very much new into this field. I want to write a contact form, which
mail problem
for sending mail!"); } catch(Exception e){ out.println(e.getMessage...mail problem  Sir, I tried ur send mail example but it giveng...; <title>Mail API</title> </head> <body><table
sending mail with attachment in jsp - JSP-Servlet
sending mail with attachment in jsp  Hi Experts
sending mail with attachment in jsp - JSP-Servlet
sending mail with attachment in jsp  Hi, Can any one pls tell me how to send email with attachment in jsp. I know how to send mail without attachment but with attachment its not working for me. If u hve any idea please
values of the "from address & to addresses" while sending a mail to localhost using javamail
values of the "from address & to addresses" while sending a mail to localhost... in JavaMail in ur website.I tried 1st program for sending the Mail.It's... is,What i have to mention in from address field and To address filed while sending
Email queue while sending mail using Struts Class
Email queue while sending mail using Struts Class  Can I maintain a queue of mails being sent from a JSP page in a DB to get its status
Email queue while sending mail using Struts Class
Email queue while sending mail using Struts Class  Can I maintain a queue of mails being sent from a JSP page in a DB to get its status
send the mail with attachment problem - Struts
send the mail with attachment problem  Hi friends, i am using the below code now .Here filename has given directly so i don't want that way. i need... mail server properties.setProperty("mail.smtp.host", host
Cheking birthday excel sheet everyday and Sending Automated MAIL to birthday boy on his birthday
Cheking birthday excel sheet everyday and Sending Automated MAIL to birthday... anyone help me out in the procedure for sending automated mail to the birthday... = systemdate, 2) Auto mail should be sent to paticular person with all the other
problem in sending more than 500 values to a jsp page
problem in sending more than 500 values to a jsp page  when i am trying to send more than 500 values from a html form to a jsp page browser is showing that server is not sending any data...I have configured tomcat5.5
problem in viewing the mail's content using javamail
problem in viewing the mail's content using javamail  i'm using the following code to view a mail in a javamail application problem i'm facing... as if they are body of the mail. Secondly in some mails i'm getting the following Exception
i have split a string by space ,done some operation and now how to properly order them for sending a mail in java or jsp - JSP-Servlet
order them for sending a mail in java or jsp  Dear sir, I have... arraylist and used that string as a argument ,passed in a sending a mail method .Now my problem is that after sent a mail when a receiver got that mail
when sending the mail from java I am getting the below error - JavaMail
when sending the mail from java I am getting the below error   when sending the mail from java I am getting the below error : Exception... not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/mail/mail.jar,file
problem in sending data from one ip to another ip in JAVA
problem in sending data from one ip to another ip in JAVA  Hi guys . this is naveen kumar...i need a help. i want to connect one ip to another ip (like ping),after that i want send the data with my system(Ip) to another ip
mail
mail  I wrote a program to send mail using smtp. But there is an error message " could not connect to smtp.gmail.com port 465. what is the problem how can i solve it ...   Please visit the following link: Java Mail API
mail
mail  how to send mail using jsp   Please visit the following links: JSP Send Mail Java Mail Tutorials
problem in getting mail exchange records(MX) using DNS in java
problem in getting mail exchange records(MX) using DNS in java  Hi, jsp file: <%@page import="javax.naming.NamingEnumeration"%> <%@page import="javax.naming.Context"%> <%@page import="java.util.Hashtable
problem in getting mail exchange records(MX) using DNS (glassfish(struts2))
problem in getting mail exchange records(MX) using DNS (glassfish(struts2))  Hi, dummy.jsp <%@page import="javax.naming.Context"%> <%@page import="java.util.Hashtable"%> <%@page import
problem in creating create .ipa file in my iPhone app
problem in creating create .ipa file in my iPhone app  Hi, does anyone have idea on how to create a .create .ipa file for my iPhone / iPad application? Also do i need to delete the previous build to create .ipa file? Thanks
mail with multiple attachments
mail with multiple attachments  code for sending mail with multiple attachments in jsp
java mail programs
java mail programs  I got some codes from this about sending mail,forwarding mail,multipart mail etc..and I compiled and executed it,but it did... output.actually,do I need a mail server to get correct output of these codes?plz help me, I
sending mails - JSP-Servlet
sending mails   sending mail using smtp protocal ,while running,i got error an javax.mail.sendfailed exception. what is this error
iphone
iphone  hiii, how can we use table recursively in iphone
java mail api - JavaMail
and Tutorials on Mail visit to : http://www.roseindia.net/mail/sending-an-email...java mail api  Hi, Pls give me the detailed information on how... in the code..   Hi friend, For solving the problem remember some
iphone
iphone  How can connect with the other database in iphone application(like... MYsql or oracle) is this dirctly possible
iphone
iphone  hello... i want to make first iphone application . How can i make it plz help me
php send mail with attachment
php send mail with attachment  Syntax of sending email with attachment in PHP
send the mail with attachment - Struts
send the mail with attachment   Hi Freinds, i am sending the mail without attachment file now. But i need to send the mail with attachment... the mail . Mail Problem is file path: how to get the file path from the browse("we
Sending email without authentication
/mail/sending-an-email-in-jsp.shtml...Sending email without authentication  Hi sir, Am doing a project in JSP, in that i want to send mail without any authentication of password so send
java mail - Java Beginners
java mail  how to send a mail without authentication one domain to another in java?  hi elumalai, check yourself, this is user problem.  Hi, You have to use the Java mail api. You need to use the SMTP
sending email code - JSP-Servlet
sending email code  How To Send Emails using jsp  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/mail/sending-an-email
send mail using smtp in java
send mail using smtp in java  How to send mail using smtp in java?   Sending mail in JSP - SMTP
for sending project build
for sending project build  hello I want to send my iphone project build to someone else how can i send it...   yes you can send but Follow the steps on the portal to creating an ad hoc build and certificate. Look
Sending email with read and delivery requests
Sending email with read and delivery requests  Hi there, I am sending emails using JavaMail in Servlets on behalf of a customer from the website..., Gareth   Please visit the following link: JSP Servlet Send Mail
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter... with how to write the code?   Please visit the following link: Java Mail
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter... with how to write the code?   Please visit the following link: Java Mail
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter... with how to write the code?   Please visit the following link: Java Mail
Java Mail - JMS
, For solving the problem visit to : http://www.roseindia.net/mail/sending-an-email... running very well,creating no other problems. Now i am trying to learn java mail service. I hav written a sample mail program to just test the code.The code
java mail
(); out.println("Thanks for sending mail!"); } catch(Exception e
java mail
java mail  By Which code or function i can send E-mail to given E-mail Address   Hi Friend, Please visit the following link: Java Mail Thanks   Hi Friend, Please visit the following link: Java Mail
java mail
java mail example  how to download javamail software give one examples   Please visit the following link: Java Mail API
E-mail Tutorials
E-mail Tutorials       Sending an email in JSP In this section, you will learn how to send
Sending message using Java Mail
Sending message using Java Mail        This Example shows you how to send a message... = System.getProperties();   // Setup mail server   
 

 

 

DMCA.com