11

I am trying to create a business card with a QR code that someone can scan and write an email to me. I want the QR code to pre-populate my email address and the subject. I tried the solution in this post (this post is the best one that I found):

http://www.labnol.org/internet/email-with-qr-code/19610/

I encountered a couple of problems - On the iPhone, the reader (QRReader app) just opens the MATMSG in plain text (I want the email client to open with the text populated). In Android (using the bar code scanner), it creates a new email but without the text or subject.

Is there any QR code solution that can get the clients to open their email client with my email address and subject populated at a minimum (for both iOS and Android devices)?

user709903
  • 195
  • 1
  • 3
  • 10

3 Answers3

18

Sean Owen is exactly correct. But let me also add a couple of notes. First, not all email clients will provision all of the fields. Second, do use a URL shortener before converting to a QR code. A simple QR code with nice, big blocks will look better and scan more easily. The first URL shortener I found that works with mailto: links is TinyURL.

So, just to be really explicit, your work flow looks like this:

mailto:your@address?subject=Hello%20there&body=You%20are%20hired

Paste that URL into TinyURL and get the short URL.

Paste the short URL into Create QR Codes and get the QR code.

Community
  • 1
  • 1
Sparky
  • 8,437
  • 1
  • 29
  • 41
  • Awesome! The URL shortener did the trick. So the solution is to take the URL given in Seth's answer and use a URL shortener will do it. – user709903 Dec 19 '11 at 13:20
  • This method still works 10 years later. A QR code directly to a mailto: doesn't work, but redirecting from TinyURL or another service works correctly. – Remington Steed Jun 18 '21 at 20:31
9

The correct syntax is:

mailto:foo@example.org?subject=bar&body=baz

Barcode Scanner supports this and hopefully iOS readers do too, but, this is really all you can and need to do on the encoding side, regardless.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • Thanks for the answer. I get a blank email in Android addressed to the email address and an "unknown contact, do you want to add contact?" message on iPhone. The Android system seems to be better placed to handle QR codes since it will at least open gmail with the email address in the "to" field. In iOS, one has to copy this email address, open email client and paste it in. I was hoping to eliminate all of these steps. – user709903 Dec 19 '11 at 13:14
  • No, it works on Android. Scan, choose "Send email", and then use Gmail to complete the action. I don't know about iPhone. But this is the standard mailto: syntax according to the RFC. – Sean Owen Dec 19 '11 at 13:20
6

I too was having trouble with the iPhone wanting to save the email address as a contact.

I found a site that generates the sort of QR code I was after, tested it to check if it worked (which it did) and then 'reverse engineered' it to see the raw source code.

The syntax is as follows:

MATMSG:TO:foo@example.com;SUB:The subject;BODY:The body;;

Hope this helps someone out there :)

Izgot Flame
  • 61
  • 1
  • 1
  • The other way wasn't working with iPhone for me. Anyone know if this one works with Android? Or others? – counterbeing Jun 22 '14 at 15:10
  • i need syntax like this "MATMSG:TO:foo@example.com;SUB:The subject;BODY:The body;;" for generating QR send sms with body and saving contact information. Can you help me? – Tester Jul 03 '19 at 14:10