The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
For those having issues with emailing invoices...
  • njbentley1njbentley1 January 2013

    I've made a couple modifications to email.php in the invoice module that send invoices using the php mail function instead of using the Zend_mail function. This should remedy most issues with connecting to smtp servers. Code is [in pastebin]:

    http://pastebin.com/TanPkBBY

    Please bear with me, I don't know much about php but since this works for me I assume it is somewhat grammatically correct. That little bit at the top prints a nice invoice summary in the body of the email. If you don't want it simply remove all the code between $htmlbody = and $_POST['email_notes'].

    This code is to be inserted into the email.php file in the invoice module; between these lines:

    #$attachment = file_get_contents('./tmp/cache/' . $pdf_file_name);

    and

    $email = new email();

    ALSO (Very Important): For this code to work you'll have to either delete or comment out the following lines:

    //$email = new email();
    //$email -> format = 'invoice';
    //$email -> notes = $_POST['email_notes'];
    //$email -> from = $_POST['email_from'];
    //$email -> from_friendly = $biller['name'];
    //$email -> to = $_POST['email_to'];
    //$email -> bcc = $_POST['email_bcc'];
    //$email -> subject = $_POST['email_subject'];
    //$email -> attachment = $pdf_file_name;
    //$message = $email -> send ();

    As you can see I chose to comment them out in favor of keeping the original code intact.

    Hope I could help!

    EDIT: This was meant to work with the most recent stable version of simple invoices as a sort of patch if you will (simpleinvoices.2011.1.zip).