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 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!

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:@"[email protected]"]; 
    NSArray *ccRecipients = [NSArray arrayWithObjects:@"[email protected]", @"[email protected]", nil]; 
    NSArray *bccRecipients = [NSArray arrayWithObject:@"[email protected]"]; 

    [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
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 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
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
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 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
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
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
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
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
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 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
iphone
iphone  hiii, how can we use table recursively in iphone
iphone
iphone  hello... i want to make first iphone application . How can i make it plz help me
iphone
iphone  How can connect with the other database in iphone application(like... MYsql or oracle) is this dirctly possible
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
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
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
mail
mail  how to send mail using jsp   Please visit the following links: JSP Send Mail Java Mail Tutorials
mail with multiple attachments
mail with multiple attachments  code for sending mail with multiple attachments in jsp
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
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
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 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
php send mail with attachment
php send mail with attachment  Syntax of sending email with attachment in PHP
problem getting password - JavaMail
problem getting password  hi i am trying to get password but igot following error Error sending mail:javax.mail.MessagingException: Could not connect to SMTP host: 192.168.10.14, port: 25;nested exception
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 butADS_TO_REPLACE_1 Follow the steps on the portal to creating an ad hoc build
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
iPhone Security and Safety Tips
while you use your iPhone mail client, surf the net or are logged into the local... to accept cookies. Secure iPhone Emailing Tips: When using your iPhone for sending... (SSL) encrypts all mail sent and received via your iPhone. Using a non-SSL 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 - 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
The iPhone as a Business Phone
of sending and receiving corporate mail as using Microsoft Exchange. ADS... The iPhone as a Business Phone       The Apple iPhone is a great consumer phone with unique
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
Sending emails and insert into trable
Sending emails and insert into trable  I have created a form, once..., but there appears to be a problem with the form you submitted.'); } $vehitype=$_POST...(); @mail($email_to, $email_subject, $email_message, $headers); $query="insert
sending mails - JSP-Servlet
sending mails  my intension is sending mails through java program with out installing any softwares.what is code
iPhone Troubleshooting Guide
the mail cannot download but you can surf the web normally using iPhone's Safari... iPhone Troubleshooting Guide       The iPhone is a pretty stable and robust smartphone

Ads