Sending mail in background - iphone

I am developing an iphone application in which i have to send a mail on custom button click and in background also it should not have user iteraction with mfmailcomposer view i.e, i dont have to show the view.
Please suggest me solution for this.
Thanks.

You could try using SKSMTPMessage:
http://code.google.com/p/skpsmtpmessage/
You won't be able to use the user's email accounts unless you ask them to provide credentials, but I've used this a few times where the sender address is not important.

The easiest solution for this problem is,
You need to create your own webservice. Pass all the details to your webservice and accordingly send email.
Details to be passed on webservice would be to/cc/bcc/subject/body etc.

Related

How to attach sent email with account

I am working on a project where we send emails to user. Now what i want is instead of user logging-in back into our system to reply, if he replies back to that email(whichever email account he got email to). It should automatically be attached back in our system.
Can somebody share their views on how to go on about this? or any suggestions on whats a best way to do this.
Many Thanks
You can do this using the auto-reply function in HmailServer.
Simply go to the administration windows, select an account, select the auto-reply function and set the subject and the body.
If you want to do this programatically, you can use the COM API, it can be used using various programming languages.

Can I get some sort of notification from parse.com if a user "flags" certain material from my iOS app?

I am using parse.com to store my backend. My data is crowd sourced. So there is a chance that some material will be vulgar/spam. I want to allow the user to flag certain objects that I store in Parse so I/others can take a look at it. My idea right now is to have the user tap a button on the object in question and have that send me an email. I don't believe I can have that send me an email with some reference to that object. I know I can have the email UI pop up and they can send it that way, and that will be my last resort. But is there a way I can utilize parse and just have that button tap send some data to my parse backend, then have that send me an email with that object id in the email?
Thanks
Look at Parse's Cloud Module Guide. It has instructions on how you can use SendGrid, Mailgun, or Mandrill from cloud code to send an email whenever a new object is saved. You can use this to send yourself an email when a user creates a new "Flag".

How do I initate an email on the iphone from a view?

I need to be able to give users the ability to call someone or email someone from a certain view in my navigation based app.
I thought I would use an action sheet with the choices and depending on the button pressed allow one or the other to be initiated (I'm simplifying a lot but ...).
I really have several questions.
Assuming this is possible to do, will my app be gone after a phone call is started?
Is there a way for me to launch/push on the stack the same "controller" and "view" that Apple uses for making calls and sending emails? Or am I going to have to code this all myself to look like their app?
I want the user to come back to the same page they were on when the email or phone call was initiated. How can I do that or is my app gone if I use their controller and nib?
Assuming it's possible to do either of these things, can I put the email address I want for a default in the to: field of the email view and if so how?
Here are the answers to your questions:
Assuming this is possible to do, will
my app be gone after a phone call is
started?
Yes.
Is there a way for me to launch/push
on the stack the same "controller"
and "view" that Apple uses for making
calls and sending emails? Or am I
going to have to code this all myself
to look like their app?
Yes. MFMailComposeViewController for Mail, and [[UIApplication sharedApplication] openURL:[NSURL URLWithString:telephoneText]] for a Call
I want the user to come back to the
same page they were on when the email
or phone call was initiated. How can
I do that or is my app gone if I use
their controller and nib?
For Mail this can be accomplished with MFMailComposeViewController. It's not possible for a telephone Call.
Assuming it's possible to do either
of these things, can I put the email
address I want for a default in the
to: field of the email view and if so
how?
Yes.
You can look at the sample code https://developer.apple.com/iphone/library/samplecode/MailComposer/index.html or the tutorial http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email
unfortunately if you make a phone call then the application is terminated. For email however, I believe there is a framework or something to do that, I think it's in the messaging API, but I'm not 100% sure as whenever I use email stuff I just do a mailto: url (which closes the app)
You can not make a phone call from within you application without exiting your app.
You can send an email inside your application using MFMailComposeViewController. Your application will remain at whatever view it was at when you present the Mail Compose View Controller view. You can set all of the normal fields in an email (subject, recipients, cc, bcc, body, ect...).

Is there any way to access iPhone mail app mailboxes inside my own iphone app?

I wonder if there's any way to loop inside a mailbox and get the list of messages inside the mailbox.
I want to open each message and take screen shot of the email. Is there any way to do this? Any reference?
Thanks for your help.
I hope not.
AFAIK there is not. The only mail interface comes from the MFMailComposeViewController.
Ask the user for their credentials, and access it via standard POP3/IMAP. If your use is legitimate, they'll be more than happy to enter them. Apple won't permit this sort of behaviour, because they really don't want a fart app stealing some CEO's private e-mail.

iPhone Programming: Send a text message? Access contact list?

I'm still new to the API and I wanted to ask:
Can you send a text message programmatically?
Can you access the users contact list programmatically?
I'm thinking no. I haven't seen anything about text messaging in the API, and I figure the sandboxing that the iPhone does keeps you away from the phones contact list.
Thanks everyone.
1) I'm afraid you can't send SMS with the iPhone SDK although you can make a link to send an SMS like so:
a href="sms:408-555-5555">408 555 5555</a>
2) You can access the contact list with the Address Book UI framework
one way round the sms/mms problem is to use an external aggregator then you can utilise http between a server and the iphone to send sms obviously there is a cost involved this way to the developer
Yes You can build an app to send SMS.
All u need a server API, which u gonna call through ur code, to send sms.
I am saying this bcoz i am currently working on it.
As soon as i m done with my app,i am gonna share it.
http://shishir.com?from=shishir&to=shishir&message=hi&sandbox=false&username=user&password=pass
u hv to pass values through URL.
will go in deep very soon.
regards
shishir