[web2py] Re: Create a pdf and attach it to a mail

2013-07-11 Thread Jaime Herrero
Thanks a lot Alan for the idea, I just tested and I had to do some modifications to the code: pdfasastring = fpdfobject.output(dest="S") import StringIO sio = StringIO.StringIO() sio.write(pdfasastring) sio.seek(0) The following instruction create a mime type for the attachment and now, the obj

[web2py] Re: Create a pdf and attach it to a mail

2013-03-17 Thread Alan Etkin
> I'm not sure what you mean in the second option I meant that you could: "... even leave the filelike object which receives the fpdf output open and use that instead as attachment input without the need to write to the filesystem ..." > when you say filelike object what are you referring to?

[web2py] Re: Create a pdf and attach it to a mail

2013-03-17 Thread jjg0
I'm not sure what you mean in the second option, when you say filelike object what are you referring to? I tried: ... ... attachments = mail.Attachment(pdf, filename='sample.pdf')) where pdf=MyFPDF() from the original example, but that doesn't work. I'm sure this isn't a new issue, but I hav

[web2py] Re: Create a pdf and attach it to a mail

2013-03-16 Thread Alan Etkin
> > I started looking at the MyFPDF examples and I am able to make simple > pdf's. I want to be able to make a pdf and attach it to an > email. Here is a simple example to show what I am doing and where I get > lost: > If your app has write access to the filesystem (almost any environment ha