1 (edited by huotg01 01/13/2011 07:47:16 pm)

Topic: Emailing invoices- How to change the text of the email

Hello

Where can I chage the text of the email when sending invoices. Right now, in the topic, it shows : Invoice #32

I would like to introduce the topic with the name of my organisation: Company- Invoices #32

Thanks

Gaston

Re: Emailing invoices- How to change the text of the email

You can change that in file /reporting/includes/header2.inc in function End().

/Joe

Re: Emailing invoices- How to change the text of the email

Are you sure Joe ?

I don't see anything related to the text included (and the object) in the email transporting the attached invoice.

Gaston

Re: Emailing invoices- How to change the text of the email

Ah, sorry Gaston. header2.inc includes the file doctext.inc that can be found in the same folder. Here are the texts.

/Joe

Re: Emailing invoices- How to change the text of the email

Joe

Sorry if I was not clear.

I'm talking about the Object and the body of the email (the invoice is attached to the email), not the invoice itself.

Where can I change the email Object field content ?

Gaston

Re: Emailing invoices- How to change the text of the email

Ok Joe. I (almost) understand now. I'm ok.

Gaston

Re: Emailing invoices- How to change the text of the email

Hi guys,

Sorry to revive this old topic, but it seems like the method for editing the emails has changed a bit in the newer versions of FA.  Is this true or am I just missing something? 

FYI - I'm trying to edit the subject and the body of the email and to add a signature with my company information.

All the best,

Re: Emailing invoices- How to change the text of the email

I'm looking for the same thing... How do I edit the body of emails when sending sale orders and invoices?

Thank you!

9 (edited by apmuthu 03/05/2013 03:01:47 pm)

Re: Emailing invoices- How to change the text of the email

Lines 100 - 117 in sales/includes/db/sales_order_db.inc

    if ($loc_notification == 1 && count($st_ids) > 0)
    {
        require_once($path_to_root . "/reporting/includes/class.mail.inc");
        $company = get_company_prefs();
        $mail = new email($company['coy_name'], $company['email']);
        $from = $company['coy_name'] . " <" . $company['email'] . ">";
        $to = $loc['location_name'] . " <" . $loc['email'] . ">";
        $subject = _("Stocks below Re-Order Level at " . $loc['location_name']);
        $msg = "\n";
        for ($i = 0; $i < count($st_ids); $i++)
            $msg .= $st_ids[$i] . " " . $st_names[$i] . ", " . _("Re-Order Level") . ": " . $st_reorder[$i] . ", " . _("Below") . ": " . $st_num[$i] . "\n";
        $msg .= "\n" . _("Please reorder") . "\n\n";
        $msg .= $company['coy_name'];
        $mail->to($to);
        $mail->subject($subject);
        $mail->text($msg);
        $ret = $mail->send();
    }

The file class.mail.inc is included in only 2 files, one above and the other is reporting/includes/pdf_report.inc where mail sending code is present.

Implementation of the phpmailer class would require the patching of the said class.mail.inc file.