Topic: HTML email is not working while sending invoices

Hi,

  I customized pdf_report.inc file with html email. its receiving the html emails on my custom web mails. but when i send it to popular mail servers like gmail and yahoo, it wont work. its showing the plain text.

I guess the class.mail.inc file is handling the email operations. And the email class  is not updated with current mailing system.

How i send html emails to all the mailer classes.

Subscription service based on FA
HRM CRM POS batch Themes

2 (edited by apmuthu 10/01/2015 06:41:04 pm)

Re: HTML email is not working while sending invoices

Try to use PHPMailer and submit to FA for inclusion when done.

FA uses mail() to send mail and is on the Wiki.

Line 1026 in reporting/includes/pdf_reports.inc:

                        $mail->text($msg . $sender);

can be replaced with:

                        $mail->html($msg . $sender);

if the $msg has html content.

Similar replacement can be done on line 77 in inventory/includes/inventory_db.inc.

Re: HTML email is not working while sending invoices

I tried that $mail->html() already and it was not working to send html content .  i mean its not there in gmail or yahoo mail.

so prefer to go with phpmailer now. once i done the change i will put it here else i will write a separate article in my blog..

Subscription service based on FA
HRM CRM POS batch Themes

Re: HTML email is not working while sending invoices

Check the raw content of any html email successfully received by gmail or yahoo mail and compare it with the mail you send out from FA and see what headers if any are missing and add them in.

Re: HTML email is not working while sending invoices

i checked it. the email contents from class,mail.inc, giving plain text contents. and its generating html content as well. but in the mail format is not html . so i started using phpmailer into the FA. it solved my issues. so if someone asks the same thing in future, please move to use phpmailer class. instead of the existing one.

Subscription service based on FA
HRM CRM POS batch Themes

Re: HTML email is not working while sending invoices

You can post your PHPMailer integration code herein.

7 (edited by kvvaradha 10/13/2015 06:22:59 am)

Re: HTML email is not working while sending invoices

Here i wrote in detail.



Read Here.

Those who looking to integreate phpmailer. than read it here.

Subscription service based on FA
HRM CRM POS batch Themes

8 (edited by apmuthu 10/06/2015 03:36:04 am)

Re: HTML email is not working while sending invoices

Attached herewith is a PDF of your article. A couple of mail-> lines above the code snippet referred to will also need to be changed suitably.

Using the Autoload may not be recommendable as it might cause multiple classes out of context to overload one another. Including just the files used like lass.phpmailer.php  (and others if used) may be better off. Better still would be to include it in another replacement file class.mail.inc where the latter's methods and properties can be aliased.

Post's attachments

FA PHPMailer class replacement.pdf 138.1 kb, 11 downloads since 2015-10-06 

You don't have the permssions to download the attachments of this post.