Emailing an image from an application - cocoa-touch

What's the best way of sending an email with an image from the application to the Mail.app for someone to send to any contact they like?
For example, in my app (iMood), you can select a 'mood', I'd like the user to be able to email this to a friend for example, by using a button in the navigation bar.
I can easily create the button etc. but just need to know a way to enable the user to send the image (ie. image.png) from the project to Mail.app as maybe an attachment or a picture in the email.
Thanks in advance.

This question has been answered many times and in many different forms.
Short answer: you can't. There is no API that allows you access to Mail attachments, and Apple's implementation of the mail URL scheme does not support attachments either.
To accomplish this, you have a couple of very unattractive options:
1) Build-in your own SMTP client. There are some Open Source libraries that are working toward this, but it's still a pain
2) Send the image to a third part server (yours) and compose and send the mail from there. Users probably won't like the possibility you collecting email addresses for nefarious purposes.
In your case, the best thing to do is save the image to the Photo Library. From there, users can send email with the photo.
If you'd like to see Apple enable email attachments, please file a request.

Related

Setting up email series in mailgun

I need to set up series of emails with time delays in mailgun.
I'm not sure this is possible without connecting to a CRM like ActiveCampaign, Mailchimp, etc.
If it's possible, can anyone share how it works?
Thanks in advance.
Mailgun is a transactional email service that gives you the ability to send emails from your own web applications. If you want to create a drip campaign like you mentioned, you’d have to add such logic to your web application either through a cron-like task or similar.
There is Mailjet from the same company that offers email automation (another name for drip emails). While I don’t have hands on experience with Mailjet like I do Mailgun, it should be a WYSIWYG interface like what you’re interested in.
At the end of the day it really comes down to what you’re after. Do you want to add email sending to your own applications where you design every aspect of the sending and scheduling logic, or do you want a tool available and ready to go.
Best,

Download email attachment through VB.NET on Outlook Web App

I understand that similar questions have been asked before on Stack Overflow and all over the internet, but my situation is a bit unique. Let me give some context:
I want to make a macro/program that automatically downloads attachments sent from a set of emails (according to date) in a specific folder on the Outlook Web App. The only issue is that this is for my workplace, and the IT department is refusing to give me the password for the outlook account which makes it difficult to sync up the Web App to the on desktop application (I am a pharmacy student who works at a Chemist Warehouse and I'm just doing this as a local pet-project because lockdown is making me bored, it would not be used for all stores).
I have come up with an idea for the solution, essentially I want to use the urlmon ability of VB.Net to download the attachment as a file from the web. I was thinking if I could put a Web Browser control on the form, make it invisible and when the program loads up it automatically goes to the store email (I can get the url), to the appropriate folder. I then want to be able to read the HTML content perhaps? and then download any and all attachments in all emails received today for example in that folder.
I understand this is a unique and weird situation, so any help is much appreciated. If there are any further questions please feel free to ask and I will answer to the best of my ability.
Thanks in advance :)
This issue has been solved now. I used the Selenium Web Driver, integrated it to VB.NET and then used it to scrape the email. Feel free to comment if you wanna know how I did it. I'm gonna close this question thread now :)

Create an email tracker

I thought I would find tons of information on the subject but somehow the implementation of email tracking seems to illude me on the web. I understand that there is the so-called email tracking pixel that you can add to an html email. I suppose the src attribute of this image (pixel) would point to a website action or api that would note the opening of the email, etc. However this seems too easy for there to be email services that charge a ton of money to track emails.
I need to implement my own email tracking and am wondering has anyone implemented an email tracking and what are the caveats to it? I am not looking for specific implementations in php, ruby or asp.net, although such would be more than welcomed. I am more looking for the basic principals and approaches to such an implementation.

How to check if an email attachment has been opened

I am working on a study that sends people a PDF document with information about their health. The team would like to know if the person has actually opened the PDF document (a sign that they didn't just ignore the e-mail). I know that it'd be possible to do it with a link to an external file, but the users are much less likely to click on a URL and download it then they are to just view an attachment, and we don't want to do anything that might prevent the users from reading the information (we've already had people say they never received the message, and with further investigation they discovered they had, they had just ignored it).
Another option is to request a read report, but this is only useful if it doesn't annoy the user (ie it does it automatically when the email is opened instead of requesting them to send one). We're currently looking into this as well, but the ability to check if the attachment has been opened is a much better idea.
The email is generated in MS SQL and sent using the database mail system, and we have adobe acrobat pro, so creating scripts in pdfs is possible (although I'm not sure whether those scripts will be allowed to run).
Thanks
1) Dont include the PDF in the email, include a link to the PDF.
or
2) Include a javascript snippet in the PDF, which hits a per-user URL or includes IP address or something to track. This will only work if the user allows javascript, and if their pdf reader supports it.
See
http://ask.metafilter.com/153206/Is-it-possible-to-track-where-a-PDF-file-goes-once-in-the-wild
Since this was originally posted there has been a number of consumer tools that now let you track PDF's sent via a web link.
http://docsend.com , http://attach.io
and if you're sharing from Dropbox
http://orangedox.com
Much easier than having to script it yourself
At this time there are a number of tools available who offer attachment tracking service to their users. I am also using SalesHandy for attachment tracking and get the deep analysis of when & where your attachment is open.
Click to read more: https://www.saleshandy.com/document-tracking/

how to programmatically send email using objective C / cocoa

Hi I am new to MAC OS development and I want to send an email programmatically trough an application, but without using Mail app like in SBSendEmail from apple's site. I dont want to attach any attachments, just a plain text email. What is the best and easiest way to do this? is it possible to use the basic functionality from SBSendEmail and automate the last step of sending mail through MAil app? Is there no easy way just like in C# to create a mail object and just send it?
Thank you.
There's no way to do this in pure Cocoa, except to use one of the three or four email libraries available (Pantomime is one I know of off the top of my head). The main problem with all of these is that they're designed for implementing a full email client, not just sending email, so they're probably more heavyweight than you need.
For Growl's MailMe display, I wrote a command-line mail-sending tool in Python. The Xcode project bundles this into the MailMe display plug-in bundle, and MailMe runs the tool using NSTask, passing the SMTP info it finds in the user's Mail preferences. Growl is also open source, so you can read the source to the MailMe display.
Things that won't work:
The Message framework, which has no public API in 64-bit.
The mail(1) tool, which requires the user to have the local SMTP server running (simple-mailer uses another SMTP server, whose name you pass in on the command line).
Note that MailMe currently does not understand how to look up MobileMe passwords, so it isn't yet able to send using MobileMe accounts. If you amend the code to do this, we'd appreciate a patch!
Another patch opportunity is that MailMe currently only looks in Mail's preferences for mail-sending settings. It could look in other clients' preferences, but does not yet know how to do that. If anyone who uses Thunderbird would like this capability, again, we'd appreciate a patch.
I would suggest you make use of /usr/lib/sendmail if present. Open a pipe to /usr/lib/sendmail and send the mail on stdin. This should be available the OS.