[Gambas-user] strange behaviour from commandline - empty mail attachments

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Aug 15 12:07:52 CEST 2013


I could build a client which prints a pdf from commandline and sends it 
to someone via e-mail, the Cairo class makes the pdfs.

My Gambas program is called by cron. It checks a mailbox and reads the 
mails if any. These are contact forms. The data are then processed into 
a pdf and the resulting pdf sent back to the person which sent the 
contact form.

The strange thing is, as long as I start the program by hand, everything 
runs as expected. But when it is started by cron, the pdfs which are 
sent back reach the recipient empty, i. e. 0 Bytes.

Sending is achieved by an external Perl script named sendEmail, I shell 
out to start it. (This is because the SMTP client in Gambas doesn't want 
to send these mails via any of my providers, haven't found the reason yet.)

But it doesn't seem to be this script's mistake. I tested the same 
pdf-file with a special version of the program which jumped directly 
into mail despatch, and when I started it from within the IDE, 
everything ran fine, but from cron it would send 0 byte pdfs.

This is slightly OT, but it might have to do with the way Gambas handles 
Shells or file rights or something completely different... Does anyone 
here have an idea?

Rolf




More information about the User mailing list