Previous Thread
Next Thread
Print Thread
Duplicated attachments #29275 26 Apr 17 04:57 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Hi Jack,

In a report with the following PDFX commands, I get the attachment duplicated in the e-mail, can you please confirm if that's a problem in A-Shell?
I've searched for a second "//PDFX,Email.AttachFile,%temp%\vendas.pdf" but didn't found.
Thanks in advance.

//PDFX,Email.Type,4
//PDFX,Email.LogFile,"c:\userdef\pdfxsmtp.log"
//PDFX,Email.SMTP.Address,mail.umzero.pt
//PDFX,Email.SMTP.UserName,tavares@umzero.pt
//PDFX,Email.SMTP.Password,****
//PDFX,Email.SMTP.Port,25
//PDFX,Email.SMTP.UseSSL,1
//PDFX,Email.To,albuquerque.tavares@gmail.com
//PDFX,Email.From,tavares@umzero.pt
//PDFX,Email.Subject,Mapa de Vendas
//PDFX,Email.AttachFile,%temp%\vendas.pdf


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Duplicated attachments #29276 26 Apr 17 05:11 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Hi Jorge,
Problem confirmed. Should be fixed in 6.4.1548.8, working on it now...

Re: Duplicated attachments #29277 26 Apr 17 05:34 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Cancel that, I meant: problem NOT confirmed!

I was initially confused by the fact that the email did in fact arrive with 2 attachments. But one is the automatic attachment you get from the contents of the print file. Assuming that the print file consists of nothing more than the statements shown above, then the default attachment ends up being a blank page.

I'm guessing that because you have nothing in your print file besides the instructions to email the attachment, you're expecting the default attachment to be eliminated, with just the explicit extra attachment (vendas.pdf) attached?

That's not unreasonable, logically speaking, but I'm not sure how easy it will be to accomplish, given the PDFX paradigm of turning the print file into a PDF file and then emailing it. I could probably detect that nothing was actually output to the default PDF output, and in that case remove it from the email attachment list, but I'm not sure about some of the odd-ball conditions, like the case where the print file is empty but the printer init file specifies an overlay.

This kind of think could be easily accomplished with EMAILX, but I suppose that if you're already using PDFX and just want the ability to use the SPOOL interface to email already-created or archived documents, then adding the additional logic to PDFX may make sense.

Re: Duplicated attachments #29278 26 Apr 17 05:52 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Outch!! :rolleyes:

That's much cleaver and completely solves the problem cool

Thank you very much.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Duplicated attachments #29279 26 Apr 17 07:17 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
For what it's worth, I added the logic to omit the main document from the email attachment list if:
1) there was nothing in it, and
2) there was at least one other explicit attachment.

You can test it with ash-6.4.1548.8-w32c-upc.zip

Note: in the process I also discovered an unnecessary delay in the email setup logic that shaves a few seconds off each email.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3