Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat Oct 21, 2017 12:03 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: a2b_mail - just a suggestion
PostPosted: Wed Feb 17, 2010 10:56 am 
Offline

Joined: Wed May 07, 2008 10:02 am
Posts: 13
Hello and thanks for the work on a2b!

I use the latest version 1.5.1.

I needed a2b to send email in UTF-8. And I guess that this is what all of us eventually need. Especially those whose clients language is not latin based. So I added a line in function a2b_mail.
Code:
$mail->CharSet = 'UTF-8';

The file is lib/Misc.php. After that all the mails are UTF-8 encoded and perfectly readable in all email clients.

So my syggestion is to add this permanently to the code of a2b.

There is another thing that I noticed, but didn't look for the file to edit. The function substr could be replaced with mb_substr for proper shortening of clients names when the language is not latin, but this is not so important.

Thanks and keep up the good work!


Top
 Profile  
 
 Post subject: Re: a2b_mail - just a suggestion
PostPosted: Fri Mar 05, 2010 8:52 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
I followed your advice, committed in rev 2771.

Use the trac to publish an enhancement or bug fix.

Thanks,
/Areski


Top
 Profile  
 
 Post subject: Re: a2b_mail - just a suggestion
PostPosted: Sat Sep 11, 2010 3:35 pm 
Offline

Joined: Sat Sep 11, 2010 2:14 pm
Posts: 2
I have having the same issue. We need Russian. Were do I add this line?

* a2b_mail - function mail used in a2billing
*/
function a2b_mail($to, $subject, $mail_content, $from = '[email protected]', $fromname = '', $contenttype = 'multipart/alternative')
{

$mail = new PHPMailer(true);

if (SMTP_SERVER) {
$mail->Mailer = "smtp";
} else {
$mail->Mailer = "sendmail";
}

$mail->Host = SMTP_HOST;
$mail->Username = SMTP_USERNAME;
$mail->Password = SMTP_PASSWORD;
$mail->Port = SMTP_PORT;
$mail->SMTPSecure = SMTP_SECURE;

if (strlen(SMTP_USERNAME) > 0)
$mail->SMTPAuth = true;


$mail->From = $from;
$mail->FromName = $fromname;
$mail->Subject = $subject;
$mail->Body = nl2br($mail_content); //$HTML;
$mail->AltBody = $mail_content; // Plain text body (for mail clients that cannot read HTML)
// if ContentType = multipart/alternative -> HTML will be send
$mail->ContentType = $contenttype;
$mail->AddAddress($to);
try {
$mail->Send();
} catch (phpmailerException $e) {
throw $e;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group