开发者

Attachments in mails sent via App Engine not readable on every mail client/ device

开发者 https://www.devze.com 2023-03-17 05:10 出处:网络
I\'m using App Engine with Python. My application basically sends vcards (.vcf) by email when users request it.

I'm using App Engine with Python. My application basically sends vcards (.vcf) by email when users request it.

Indeed, files with .vcf extension are supported by App Engine. I use the mail API to send them as attachment. Before, I stored them as db.Blob().

Problem:

Most of the time, Blackberry users cannot read the vcards sent as attachments by my application. At the bottom of the mail, it displays: "application/X-rimdeviceAddress Book:" and when you click on the file, it says: "This type of attachment cannot be opened on your device".

Exception:

A blackberry that receives a vcard serialized from a Blackberry can open it.

Fortunately, it perfectly works on the iPhone and (most of the time) on Android phones.

As vcards serialized from a Blackberry can be correctly opened by Blackberry users, I guess I'm doing something wrong during the storage and/ or the mail dispatc开发者_StackOverflow中文版h. Or maybe, the MIME type is not correctly set by App Engine methods...

Can someone give a few leads to investigate this pretty annoying problem (I was expecting a pretty big user base on Blackberry phones...)?


Obviously as I mentioned on my comment above:
- it has nothing to do with Google App Engine
- some devices are just not able to read vcards in format 3.0

But I haven't found a good parser/ converter so far (from vcard 3.0 to vcard 2.1 in python) so if anyone knows one, please let me know. Otherwise, I'll have to build it myself...


What is the code you are generating the vcard with? if I send a vcard from my blackberry device to an e-mail (opening it on a PC)

if I inspect the code with Notepad++

I spot the diffrents:

   X-SALUTATION:Mr/Miss
        X-HomeAddress1:HomeAddressStreet
        X-HomeAddress2:
        X-HomeCity:HomeAddressCity
        X-HomeState/Prov:HomeAddressStateProvince
        X-HomeZIP/PostalCode:1234 AA
        X-HomeCountry:HomeAddressCountry
        X-URL:http://www.url.com

How do you mentioned these lines in your Generate code?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号