See http://web2py.com/books/default/chapter/29/08#Attachments. Instead of 
specifying a file path as the first argument to mail.Attachment(), you can 
pass in a file-like object, such as a cStringIO.StringIO object. Note, in 
that case, you will also have to specify the "filename" argument to provide 
a file name for the vCard.

Anthony

On Tuesday, May 14, 2013 3:45:40 AM UTC-4, Annet wrote:
>
> I have a download vCard button in one of my views. Instead of downloading
> the vCard to the vistors addressbook, I'd like to make it possible to 
> attach
> the vCard to a mail.
>
> I have a download_vcard() function and a view download_vcard.vcf which 
> renders the vCard.
>
> How would I attach this to a mail?
>
> Kind regards
>
> Annet
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to