Sending Email with attachment from Parse.com - ios

I am working on my first IOS app which will be displayed in a public place where a user can draw an image and send this image to an email adres. I don't want to use Mail for this and the image also can not be stored on the iPad.
Therefore, i use Parse.com to store the image including name and email adres.
Now, i need to make a simple interface to send all the emails to the correct email adres including the image. We would like to check the image an email adres before sending. So i was thinking of showing some sort of tabel, with the image, name and emailadres and a send or delete button. So with a quick click we can send the image.
Now I don't know where to start!
What is the most easy way to do this? Making a second IOS app where all the images will be shown and can send/delete from? Using Mailgun and Cloud Code?
Or true a web-base interface? Using PHP?
I am all very new to this, so please help me.

Parse integrates with mail services like Mandrill so you can send e-mails from there using cloud code.
You need to have some users in the system, or some store of user details at least, then you can upload the images. Look at using a class for images, where the class just has a single PFFile and a relationship to a user.
Now, in your app you can display images and the associated user info. When hitting the 'send' button you would call a cloud function with the image objectId. The cloud code can use that to find the image, it can use Parse.Cloud.httpRequest to get the data for the image from the PFFile. Once you have that you can create your e-mail and send it.

Related

Is it possible to send mails periodically from iOS app

I'm developing an app that creates a simple document with basic information created by the app. It won't contain any personal information, but it will contain data created and requested by the user. I want the user to be able to send this to themselves via email. I would also like to add the option for the user to have this file (which updates daily) to be able to send to them automatically every week/month, so they won't have to think about it. The user can set the intervals themselves.
Is this possible? The user will set up this option themselves from a menu, so it's not like they won't know it's happening. Every automatic mail will also contain information on how to turn the option back off again.
Is this possible and is it allowed by Apple?
Thanks for your reply
It is not possible from within the app. A user has to explicitly send the email through the MFMailComposeViewController.
If you want this functionality, you should build a backend for your app.
To clarify, if you want to use the users configured accounts; i.e. the account they use with Mail, then no you cannot do this automatically. The other answers rely on the fact a user enters their POP/IMAP settings, which personally I would never do.
You could use an email service as mandril or mailgun, to send emails "from your app".
Take a look at this: https://github.com/rackerlabs/objc-mailgun
There's a library called MailCore that's incredibly powerful. You can use it to send mail in the background of your app without needing to present the built in mail composer view
https://github.com/MailCore/mailcore2

Quickblox: Share 1.Image and 2.Video along with text chat among users

I am able to establish 1-1 chat by creating a room. I have used room because I will get history of last 50 messages (I would prefer more in number with paged results and expecting this feature in the near future).
I am unable to figure out how I can implement image and video sharing in between the text chat.
I also want this in the history I get. I mean I need to get the order of the text/image/video along with their details to display to the user.
When I upload an image file using Content module, the files are saved in a separate table in contents section (which is fine for user's gallery kind of app). But for chat we need to know who sent to whom and what (image/video/text).
I would like to know whether this is possible with the current version of the Quickblox sdk. or else is there any way we can establish this using Custom objects module? If possible, will this work if there are more number of users in the room? Please give me a solution to this.
If you want create chat with content, you need to use a Custom Objects. (in current QB version).
Advantage - you can also get chat history and implement deleting of message history.
But this method doesn't very simply.
At first you need create Custom objects represented next things:
single chat message
group chat message
(may be need create extended user profile)
At first, you can use QBChat module for changing service information between users.
When you need send message, you create Custom Object (CO) - message with parameters and upload it. When it uploading, you send service message via QB chat to your opponent user. When opponent will receive it, he should perform request for updating CO (in this case - single message).
As example, single chat message can contain next parameters:
opponent qb user id;
owner qb user id;
message text;
link to content;
Sending of content message divide to next steps:
At first, you need upload content file using Content module, and after this create message CO, upload it on server and send service message to your opponent

Sending vCard update

I'm currently playing with the XMPPFramework for iOS and I had the idea to let users make their own profile, based on vCards. I've made a screen where they can enter some information, such as date of birth, first/last name etc. When they are done they press the 'save' button.
What I would like to do, is to letting know everyone that's subscribed to this user that his vCard changed but I'm not sure how to do this. I've already tried to send a vcard-temp:x:update stanza but the message didn't arrive on my other device I'm testing with.
Does anyone know how I could do this and which method I could use?
You cannot know about vCard changes,
You can only know about photo updates via XEP: 0153
This xep uses the presence to send the photo there.

How do I access in my app content of email created in the app

I have created an iphone app that allows the user to send an email using MFMailComposeViewController. I know that when the email is sent a copy is kelp in the "Sent" emails of the email client. What I wanted to do was also save that data/information to a text file on the iphone (as a log file). I can't find how to access the email information (recipient, body, etc) so as to input into the text file. Can this be done?
Thanks in advance for your help
No it can't be done in that you can't access the user's emails.
Your app can log when you present a MFMailComposeViewController and what data your app filled it in with before it was presented to the user. But you won't know if they changed it.
You dont have access to the email text in MFMailComposer class. What you can do is, create a view to capture to, cc, subject and message and then launch MFMailComposer delegate and prepopulate all the captured data. The user still has to submit the mail and could change the text all together. The captured data can then be stored within the app.

Can I place an email in iOS's outbox (preferably with MonoTouch)?

I would like to place an email in the iPhones email outbox, without showing the compose window to the user, so that he can not mess with the data that I want to send. Is this possible?
Thanks,
Timo
No - if you want to send an email using the user's email account you must allow them to modify the message contents: that's part of Apple's message framework. To be honest, it's a fairly sensible feature...I don't think many people would want an app that could just send things out without alerting the user or allowing them to modify it.
If you want to send a message and stop the user from messing with your data, just add an attachment and check for the attachment on the backend (assuming that because you want to send specific data)

Resources