Topic: email sale invoice with extra attachment does not work

Hi all,

I am not sure if I did this wrong, but when I created a direct invoice, and processed it.  In the next window, there are options to view, print, email, and I wouldl like to email my client with additional pdf attachment, so i clicked on Add an attachment, and follow the next screen.  But when I went back and clicked on the email this invoice, my client did not receive the additional attachment.

Any idea how to fix this?

Tanks

Re: email sale invoice with extra attachment does not work

Add an Attachment is for adding it to the transaction in FA and not to add an attachment to be emailed!

Re: email sale invoice with extra attachment does not work

Can I add this attachment in the email?  If yes, then which class do I need to make the change to?

Thanks

4 (edited by apmuthu 10/02/2015 10:17:34 am)

Re: email sale invoice with extra attachment does not work

Ordinarily, you cannot add such transactional attachments in your mail out from FA. Check the link for the attachment and add that in your message template and password protect the folder containing it so that it is clickable to download it in an authorised way.

Re: email sale invoice with extra attachment does not work

Of course you could tweak the code to send the message with more attachments. The basic steps should be obvious to any programmer:

1. Find the code which attaches the invoice to the email message.
2. Look up the attachments in FA for the transaction in question.
3. Add these as email attachments in whatever way the invoice is added.


(Apmuthu's suggestion only works if your server is accessible from the internet, and I'm not sure it's any easier. It requires changes not only to FA itself, but also to the web server configuration. Errors in the latter could affect the entire server.)

Re: email sale invoice with extra attachment does not work

Thanks apmuthu.  I got it.  I changed the code and it works now.

tm,

I am a programer, and yes, it is very obvious of the process/procedure/logic.  It is however not obvious to know which class hold the code to make the change for newbie  to FA.  And yes, if you spent enough time comb through the code, you will eventually find it, and I did find it. 

But i thought the purpose of the forum is to quickly point out thing that other already had been through to speed up the process.  And yes, sometimes people asked the questions that already had been asked in the forum, which can be easily point to by users that are more familiar with the code.

My question is which class i need to make changes to, which I was hoping some senior users, eg. not age, but more FA code experience, can point me to.  Since I am a newbie to this FA, I just make changes to the class that help me solve my need, and git them so next upgrade I know where to make the change.

Thanks for info anyway.

Re: email sale invoice with extra attachment does not work

tomle wrote:

Thanks apmuthu.  I got it.  I changed the code and it works now.

tm,

I am a programer, and yes, it is very obvious of the process/procedure/logic.  It is however not obvious to know which class hold the code to make the change for newbie  to FA.  And yes, if you spent enough time comb through the code, you will eventually find it, and I did find it. 

But i thought the purpose of the forum is to quickly point out thing that other already had been through to speed up the process.  And yes, sometimes people asked the questions that already had been asked in the forum, which can be easily point to by users that are more familiar with the code.

My question is which class i need to make changes to, which I was hoping some senior users, eg. not age, but more FA code experience, can point me to.  Since I am a newbie to this FA, I just make changes to the class that help me solve my need, and git them so next upgrade I know where to make the change.

Thanks for info anyway.

For those of use that aren't programmers can't you help walk me through how to make this same change?

Thanks

Re: email sale invoice with extra attachment does not work

All email in FA are sent using the class email which is in reporting/includes/class.mail.inc.

Search for the text "new email" in the FA code and all such places that use it will emerge and in FA it will be:

reporting/includes/inventory_db.inc => function send_reorder_email()
reporting/includes/pdf_report.inc => function FrontReport::End()

Since it is inside functions, search  recursively for each function call in the codebase.

Re: email sale invoice with extra attachment does not work

apmuthu wrote:

All email in FA are sent using the class email which is in reporting/includes/class.mail.inc.

Search for the text "new email" in the FA code and all such places that use it will emerge and in FA it will be:

reporting/includes/inventory_db.inc => function send_reorder_email()
reporting/includes/pdf_report.inc => function FrontReport::End()

Since it is inside functions, search  recursively for each function call in the codebase.

I have no clue what you are talking about here.  I am not a programmer at all.  Can you explain in plain english please.  Thanks

Re: email sale invoice with extra attachment does not work

First decide where you will have your pdfs to be attached and what naming convention you would use so that the "id" of the invoice is part of the file name. When creating links, the invoice number will be available to the script which can be used to construct the desired link for the file. Check out the code where the invoice is attached and add a similar line for your file.

Please note that this kind of change should be attempted by PHP programmers and is not meant for the faint of heart. Sufficient debugging will be needed as well besides checks for file presence, content and permissions need to be taken care of.

Re: email sale invoice with extra attachment does not work

apmuthu wrote:

First decide where you will have your pdfs to be attached and what naming convention you would use so that the "id" of the invoice is part of the file name. When creating links, the invoice number will be available to the script which can be used to construct the desired link for the file. Check out the code where the invoice is attached and add a similar line for your file.

Please note that this kind of change should be attempted by PHP programmers and is not meant for the faint of heart. Sufficient debugging will be needed as well besides checks for file presence, content and permissions need to be taken care of.

Ok, how about an easier task than?  How can I get it to just open up gmail and attach the invoice but not send the message right away, that way I can edit the email and add other supporting documents?  Thanks.

Re: email sale invoice with extra attachment does not work

Alternatively, you can send the email out to your gmail address from FA and then manipulate it in gmail and forward to who you want.

If you are using Mercury Mail in Windows XAMPP then you can configure your mail client to approve all outgoing mail before being sent.

Re: email sale invoice with extra attachment does not work

apmuthu wrote:

Alternatively, you can send the email out to your gmail address from FA and then manipulate it in gmail and forward to who you want.

If you are using Mercury Mail in Windows XAMPP then you can configure your mail client to approve all outgoing mail before being sent.

That's kind of counter productive sending it my gmail account first because then it'll show that I forwarded the email to who it needs to go to.

Is there no way to get it to call up gmail?  I know when I got  my company setup and click on the link next to my email address it pulls up gmail right from there with my address already pre-populated.

Thanks

Re: email sale invoice with extra attachment does not work

Bump, any response to last question?

Re: email sale invoice with extra attachment does not work

There is no built in feature for frontaccounting to edit email content while sending your invoice through mail. Just follow the steps.
You can take a pdf separately and get the email address and sending it to the desired user and you can add extra attachments and extra contents with it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: email sale invoice with extra attachment does not work

All I was wondering is if there is a way to make it open up gmail directly just like the html mailto function.

Re: email sale invoice with extra attachment does not work

Hi,

How can this be done? I also want to attach few documents (such as a timesheet) with the invoice email before sending out. Can anyone please tell me where to change the code?