本文整理汇总了PHP中Mail::replaceInEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Mail::replaceInEmail方法的具体用法?PHP Mail::replaceInEmail怎么用?PHP Mail::replaceInEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mail
的用法示例。
在下文中一共展示了Mail::replaceInEmail方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: round
}
if (!empty($last_invoice)) {
$param_update_billing = "id_invoice = '".$last_invoice."'";
$clause_update_billing = " id= ".$id_billing;
$billing_table ->Update_table($A2B->DBHandle,$param_update_billing,$clause_update_billing);
if ($verbose_level >= 2)
echo "\n Update Billing :> " . $param_update_billing . " WHERE " . $clause_update_billing;
}
// Send a mail for invoice to pay
if (!empty($last_invoice)) {
$total = round($total,2);
try {
$mail = new Mail(Mail::$TYPE_INVOICE_TO_PAY, $card_id);
$mail->replaceInEmail(Mail::$INVOICE_REFERENCE_KEY, $invoice_reference);
$mail->replaceInEmail(Mail::$INVOICE_TITLE_KEY, $invoice_title);
$mail->replaceInEmail(Mail::$INVOICE_DESCRIPTION_KEY, $invoice_description);
$mail->replaceInEmail(Mail::$INVOICE_TOTAL_KEY, $total);
$mail->replaceInEmail(Mail::$INVOICE_TOTAL_VAT_KEY, $total_vat);
$mail->send();
if ($verbose_level >= 2)
echo "\n Email sent for invoice to pay, card id :> ".$card_id;
} catch (A2bMailException $e) {
$error_msg = $e->getMessage();
if ($verbose_level >= 1)
echo "Sent mail error : ".$error_msg;
}
}
if ($verbose_level >= 2)
示例2: Mail
// block the card
$QUERY = "UPDATE cc_card SET status = 8 WHERE id=" . $subscription['card_id'];
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY, 0);
if ($verbose_level >= 1) {
echo "==> UPDATE CARD QUERY: \t{$QUERY}\n";
}
$QUERY = "UPDATE cc_card_subscription SET paid_status = 3 WHERE id=" . $subscription['card_subscription_id'];
if ($verbose_level >= 1) {
echo "==> UPDATE SUBSCRIPTION QUERY: \t{$QUERY}\n";
}
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY, 0);
if ($verbose_level >= 1) {
echo "==> UPDATE CARD QUERY: \t{$QUERY}\n";
}
$mail = new Mail(Mail::$TYPE_SUBSCRIPTION_DISABLE_CARD, $subscription('card_id'));
$mail->replaceInEmail(Mail::$SUBSCRIPTION_FEE, $subscription['fee']);
$mail->replaceInEmail(Mail::$SUBSCRIPTION_ID, $subscription['id']);
$mail->replaceInEmail(Mail::$SUBSCRIPTION_LABEL, $subscription['product_name']);
try {
$mail->send();
} catch (A2bMailException $e) {
if ($verbose_level >= 1) {
echo "[Sent mail failed : {$e}]";
}
write_log(LOGFILE_CRONT_SUBSCRIPTIONFEE, basename(__FILE__) . ' line:' . __LINE__ . "[Sent mail failed : {$e}]");
}
break;
}
}
sleep(10);
}
开发者ID:ekamhara,项目名称:BootStrap-A2Billing-custom-templates,代码行数:31,代码来源:a2billing_subscription_fee.php
示例3: proccessing_billing_customer
//.........这里部分代码省略.........
if(!empty($id_receipt)&& is_numeric($id_receipt)){
foreach ($result as $charge) {
$description = gettext("CHARGE :").$charge['description'];
$amount = $charge['amount'];
$field_insert = "date, id_receipt,price,description,id_ext,type_ext";
$instance_table = new Table("cc_receipt_item", $field_insert);
$value_insert = " '".$charge['creationdate']."' , '$id_receipt', '$amount','$description','".$charge['id']."','CHARGE'";
$instance_table -> Add_table ($FormHandler->DBHandle, $value_insert, null, null,"id");
}
}
}
$total =0;
$total_vat =0;
// GENERATE INVOICE FOR CHARGE NOT YET CHARGED
$table_charge = new Table("cc_charge", "*");
$result = $table_charge -> Get_list($FormHandler->DBHandle, $clause_charge." AND charged_status = 0 AND invoiced_status = 0");
$last_invoice = null;
if (is_array($result) && sizeof($result)>0){
$reference = generate_invoice_reference();
$field_insert = "date, id_card, title ,reference, description,status,paid_status";
$date = date("Y-m-d h:i:s");
$title = gettext("BILLING CHARGES");
$description = gettext("This invoice is for some charges unpaid since the last billing.")." ".$desc_billing_postpaid;
$invoice_title = $title;
$invoice_reference =$reference;
$invoice_description = $description;
$value_insert = " '$date' , '$card_id', '$title','$reference','$description',1,0";
$instance_table = new Table("cc_invoice", $field_insert);
$id_invoice = $instance_table -> Add_table ($FormHandler->DBHandle, $value_insert, null, null,"id");
if(!empty($id_invoice)&& is_numeric($id_invoice)){
$last_invoice = $id_invoice;
foreach ($result as $charge) {
$description = gettext("CHARGE :").$charge['description'];
$amount = $charge['amount'];
$total = $total + $amount;
$total_vat =$total_vat + round($amount *(1+($vat/100)),2);
$field_insert = "date, id_invoice,price,vat,description,id_ext,type_ext";
$instance_table = new Table("cc_invoice_item", $field_insert);
$value_insert = " '".$charge['creationdate']."' , '$id_invoice', '$amount','$vat','$description','".$charge['id']."','CHARGE'";
$instance_table -> Add_table ($FormHandler->DBHandle, $value_insert, null, null,"id");
}
}
}
// behaviour postpaid
if($card_result[0]['typepaid']==1 && is_numeric($card_result[0]['credit']) && ($card_result[0]['credit']+$lastpostpaid_amount)<0) {
//GENERATE AN INVOICE TO COMPLETE THE BALANCE
if (!empty($last_invoice)) {
$id_invoice = $last_invoice;
} else {
$reference = generate_invoice_reference();
$field_insert = "date, id_card, title ,reference, description,status,paid_status";
$date = date("Y-m-d h:i:s");
$title = gettext("BILLING POSTPAID");
$description = gettext("Invoice for POSTPAID");
$invoice_title = $title;
$invoice_reference =$reference;
$invoice_description = $description;
$value_insert = " '$date' , '$card_id', '$title','$reference','$description',1,0";
$instance_table = new Table("cc_invoice", $field_insert);
$id_invoice = $instance_table -> Add_table ($FormHandler->DBHandle, $value_insert, null, null,"id");
}
if (!empty($id_invoice)&& is_numeric($id_invoice)) {
$last_invoice = $id_invoice;
$description = $desc_billing_postpaid;
$amount = abs($card_result[0]['credit']+$lastpostpaid_amount);
$total = $total + $amount;
$total_vat =$total_vat + round($amount *(1+($vat/100)),2);
$field_insert = "date, id_invoice,price,vat,description,id_ext,type_ext";
$instance_table = new Table("cc_invoice_item", $field_insert);
$value_insert = " '$date' , '$id_invoice', '$amount','$vat','$description','".$FormHandler -> RESULT_QUERY."','POSTPAID'";
$instance_table -> Add_table ($FormHandler->DBHandle, $value_insert, null, null,"id");
}
}
if (!empty($last_invoice)) {
$param_update_billing = "id_invoice = '".$last_invoice."'";
$clause_update_billing = " id= ".$FormHandler -> RESULT_QUERY;
$billing_table ->Update_table($FormHandler->DBHandle,$param_update_billing,$clause_update_billing);
}
//Send a mail for invoice to pay
if (!empty($last_invoice)) {
$total = round($total,2);
$mail = new Mail(Mail::$TYPE_INVOICE_TO_PAY, $card_id);
$mail->replaceInEmail(Mail::$INVOICE_REFERENCE_KEY, $invoice_reference);
$mail->replaceInEmail(Mail::$INVOICE_TITLE_KEY, $invoice_title);
$mail->replaceInEmail(Mail::$INVOICE_DESCRIPTION_KEY, $invoice_description);
$mail->replaceInEmail(Mail::$INVOICE_TOTAL_KEY, $total);
$mail->replaceInEmail(Mail::$INVOICE_TOTAL_VAT_KEY, $total_vat);
$mail -> send();
}
//Update billing ...
if (!empty($start_date)) {
$param_update_billing = "start_date = '".$start_date."'";
$clause_update_billing = " id= ".$FormHandler -> RESULT_QUERY;
$billing_table ->Update_table($FormHandler->DBHandle,$param_update_billing,$clause_update_billing);
}
}
示例4: catch
$mail->replaceInEmail(Mail::$TICKET_OWNER_KEY, $owner);
$mail->replaceInEmail(Mail::$TICKET_NUMBER_KEY, $id_ticket);
$mail->replaceInEmail(Mail::$TICKET_DESCRIPTION_KEY, $description);
$mail->replaceInEmail(Mail::$TICKET_PRIORITY_KEY, Ticket::DisplayPriority($priority));
$mail->replaceInEmail(Mail::$TICKET_STATUS_KEY, "NEW");
$mail->replaceInEmail(Mail::$TICKET_TITLE_KEY, $title);
$mail->send($result[0]['email']);
} catch (A2bMailException $e) {
$error_msg = $e->getMessage();
}
$component_table = new Table('cc_support_component LEFT JOIN cc_support ON id_support = cc_support.id', "email");
$component_clause = "cc_support_component.id = " . $component;
$result = $component_table->Get_list($HD_Form->DBHandle, $component_clause);
try {
$mail = new Mail(Mail::$TYPE_TICKET_NEW, null, $result[0]['language']);
$mail->replaceInEmail(Mail::$TICKET_OWNER_KEY, $owner);
$mail->replaceInEmail(Mail::$TICKET_NUMBER_KEY, $id_ticket);
$mail->replaceInEmail(Mail::$TICKET_DESCRIPTION_KEY, $description);
$mail->replaceInEmail(Mail::$TICKET_PRIORITY_KEY, Ticket::DisplayPriority($priority));
$mail->replaceInEmail(Mail::$TICKET_STATUS_KEY, "NEW");
$mail->replaceInEmail(Mail::$TICKET_TITLE_KEY, $title);
$mail->send($result[0]['email']);
} catch (A2bMailException $e) {
$error_msg = $e->getMessage();
}
$update_msg = gettext("Ticket added successfully");
} elseif (strlen($description) + strlen($title) == 0) {
$update_msg = gettext("Please complete the title and description portions of the form.");
} else {
$update_msg = gettext("Sorry, There was a problem creating your ticket.");
}
示例5: basename
$VAT = $transaction_data[0]['vat'];
}
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "curr amount {$currAmount} {$currCurrency} BASE_CURRENCY=" . BASE_CURRENCY);
$amount_paid = convert_currency($currencies_list, $currAmount, $currCurrency, BASE_CURRENCY);
$amount_without_vat = $amount_paid / (1 + $VAT / 100);
//If security verification fails then send an email to administrator as it may be a possible attack on epayment security.
if ($security_verify == false) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "- security_verify == False | END");
try {
//TODO: create mail class for agent
$mail = new Mail('epaymentverify', null);
} catch (A2bMailException $e) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " ERROR NO EMAIL TEMPLATE FOUND");
exit;
}
$mail->replaceInEmail(Mail::$TIME_KEY, date("y-m-d H:i:s"));
$mail->replaceInEmail(Mail::$PAYMENTGATEWAY_KEY, $transaction_data[0][4]);
$mail->replaceInEmail(Mail::$ITEM_AMOUNT_KEY, $amount_paid . $currCurrency);
// Add Post information / useful to track down payment transaction without having to log
$mail->AddToMessage("\n\n\n\n" . "-POST Var \n" . print_r($_POST, true));
$mail->send(ADMIN_EMAIL);
exit;
}
$newkey = securitykey(EPAYMENT_TRANSACTION_KEY, $transaction_data[0][8] . "^" . $transactionID . "^" . $transaction_data[0][2] . "^" . $transaction_data[0][1]);
if ($newkey == $key) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "----------- Transaction Key Verified ------------");
} else {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "----NEW KEY =" . $newkey . " OLD KEY= " . $key . " ------- Transaction Key Verification Failed:" . $transaction_data[0][8] . "^" . $transactionID . "^" . $transaction_data[0][2] . "^" . $transaction_data[0][1] . " ------------\n");
exit;
}
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " ---------- TRANSACTION INFO ------------\n" . print_r($transaction_data, 1));
示例6: Header
}
Header("Location: {$url_forward}");
die;
}
if ($orderStatus == 0 && $transaction_data[0][4] == 'iridium') {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " EPAYMENT ORDER STATUS = " . $statusmessage);
die;
}
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " EPAYMENT ORDER STATUS = " . $statusmessage);
// CHECK IF THE EMAIL ADDRESS IS CORRECT
if (preg_match("/^[a-z]+[a-z0-9_-]*(([.]{1})|([a-z0-9_-]*))[a-z0-9_-]+[@]{1}[a-z0-9_-]+[.](([a-z]{2,3})|([a-z]{3}[.]{1}[a-z]{2}))\$/i", $customer_info["email"])) {
// FIND THE TEMPLATE APPROPRIATE
try {
$mail = new Mail(Mail::$TYPE_PAYMENT, $id);
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-SENDING EMAIL TO CUSTOMER " . $customer_info["email"]);
$mail->replaceInEmail(Mail::$ITEM_AMOUNT_KEY, $amount_paid);
$mail->replaceInEmail(Mail::$ITEM_ID_KEY, $id_logrefill);
$mail->replaceInEmail(Mail::$ITEM_NAME_KEY, 'balance');
$mail->replaceInEmail(Mail::$PAYMENT_METHOD_KEY, $pmodule);
$mail->replaceInEmail(Mail::$PAYMENT_STATUS_KEY, $statusmessage);
$mail->send($customer_info["email"]);
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-SENDING EMAIL TO CUSTOMER " . $customer_info["email"]);
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . "- MAILTO:" . $customer_info["email"] . "-Sub=" . $mail->getTitle() . " , mtext=" . $mail->getMessage());
// Add Post information / useful to track down payment transaction without having to log
$mail->AddToMessage("\n\n\n\n" . "-POST Var \n" . print_r($_POST, true));
$mail->setTitle("COPY FOR ADMIN : " . $mail->getTitle());
$mail->send(ADMIN_EMAIL);
} catch (A2bMailException $e) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " ERROR NO EMAIL TEMPLATE FOUND");
}
} else {
示例7: VALUES
if ($verbose_level >= 1) {
echo "==> UPDATE DID USE QUERY: \t{$QUERY}\n";
}
$QUERY = "INSERT INTO cc_did_use (activated, id_did) VALUES ('0','" . $mydids[0] . "')";
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY, 0);
if ($verbose_level >= 1) {
echo "==> INSERT NEW DID USE QUERY: \t{$QUERY}\n";
}
$QUERY = "DELETE FROM cc_did_destination WHERE id_cc_did =" . $mydids[0];
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY, 0);
if ($verbose_level >= 1) {
echo "==> DELETEDID did_destination QUERY: \t{$QUERY}\n";
}
$mail_user = true;
$mail = new Mail(Mail::$TYPE_DID_RELEASED, $mydids[4]);
$mail->replaceInEmail(Mail::$DID_NUMBER_KEY, $mydids[7]);
$mail->replaceInEmail(Mail::$DID_COST_KEY, $mydids[3]);
$mail->replaceInEmail(Mail::$BALANCE_REMAINING_KEY, $mydids[5]);
}
}
$user_mail_adrr = $mydids[6];
$user_card_id = $mydids[4];
if (!is_null($mail) && $mail_user && strlen($user_mail_adrr) > 5) {
try {
$mail->send($user_mail_adrr);
} catch (A2bMailException $e) {
if ($verbose_level >= 1) {
echo "[Sent mail failed : {$e}]";
}
write_log(LOGFILE_CRONT_BILL_DIDUSE, basename(__FILE__) . ' line:' . __LINE__ . "[Sent mail failed : {$e}]");
}
示例8: basename
if ( ($OrderStatus == 0) && ($transaction_data[0][4]=='iridium')) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__).' line:'.__LINE__." - transactionID=$transactionID"." EPAYMENT ORDER STATUS = ".$statusmessage);
die();
}
write_log(LOGFILE_EPAYMENT, basename(__FILE__).' line:'.__LINE__." - transactionID=$transactionID"." EPAYMENT ORDER STATUS = ".$statusmessage);
// CHECK IF THE EMAIL ADDRESS IS CORRECT
if (preg_match("/^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$/i", $customer_info["email"])) {
// FIND THE TEMPLATE APPROPRIATE
try {
$mail = new Mail(Mail::$TYPE_PAYMENT,$id);
write_log(LOGFILE_EPAYMENT, basename(__FILE__).' line:'.__LINE__." - SENDING EMAIL TO CUSTOMER ".$customer_info["email"]);
$mail->replaceInEmail(Mail::$ITEM_AMOUNT_KEY,$amount_paid);
$mail->replaceInEmail(Mail::$ITEM_ID_KEY,$id_logrefill);
$mail->replaceInEmail(Mail::$ITEM_NAME_KEY,$item_name);
$mail->replaceInEmail(Mail::$PAYMENT_METHOD_KEY,$pmodule);
$mail->replaceInEmail(Mail::$PAYMENT_STATUS_KEY,gettext($statusmessage));
$mail->send($customer_info["email"]);
write_log(LOGFILE_EPAYMENT, basename(__FILE__).' line:'.__LINE__." - transactionID=$transactionID"."- MAILTO:".$customer_info["email"]."-Sub=".$mail->getTitle()." , mtext=".$mail->getMessage());
// Add Post information / useful to track down payment transaction without having to log
$mail->AddToMessage("\n\n\n\n"."-POST Var \n".print_r($_POST, true));
$mail->setTitle("COPY FOR ADMIN : ".$mail->getTitle());
$mail->send(ADMIN_EMAIL);
} catch (A2bMailException $e) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__).' line:'.__LINE__." - transactionID=$transactionID"." ERROR NO EMAIL TEMPLATE FOUND");
示例9: insertComment
public function insertComment($desc, $creator, $creator_type)
{
$DBHandle = DbConnect();
$instance_sub_table = new Table("cc_ticket_comment", "*");
$QUERY_FIELDS = 'id_ticket, description,creator, creator_type';
$QUERY_VALUES = "'{$this->id}', '{$desc}','{$creator}', '{$creator_type}'";
switch ($creator_type) {
case 0:
$QUERY_FIELDS .= " ,viewed_cust ";
$QUERY_VALUES .= " ,'0'";
break;
case 1:
$QUERY_FIELDS .= " ,viewed_admin ";
$QUERY_VALUES .= " ,'0'";
break;
case 2:
$QUERY_FIELDS .= " ,viewed_agent ";
$QUERY_VALUES .= " ,'0'";
break;
}
$return = $instance_sub_table->Add_table($DBHandle, $QUERY_VALUES, $QUERY_FIELDS, 'cc_ticket_comment', 'id');
switch ($creator_type) {
case 0:
$instance_sub_table = new Table("cc_card", "lastname, firstname");
$QUERY = " id = " . $creator;
$subreturn = null;
$subreturn = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$subvalue = $subreturn[0];
if (!is_null($subvalue)) {
$owner_comment = $subvalue["lastname"] . " " . $subvalue["firstname"];
}
break;
case 1:
$instance_sub_table = new Table("cc_ui_authen", "*");
$QUERY = " userid = " . $creator;
$subreturn = null;
$subreturn = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$subvalue = $subreturn[0];
if (!is_null($subvalue)) {
$owner_comment = "(ADMINISTRATOR) " . $subvalue["login"];
}
break;
case 2:
$instance_sub_table = new Table("cc_agent", "lastname, firstname,login");
$QUERY = " id = " . $creator;
$subreturn = null;
$subreturn = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$subvalue = $subreturn[0];
if (!is_null($subvalue)) {
$owner_comment = "(AGENT) " . $subvalue["login"] . " - " . $subvalue["firstname"] . " " . $subvalue["lastname"];
}
break;
}
$owner = $this->creator_login . " (" . $this->creator_firstname . " " . $this->creator_lastname . ")";
try {
$mail = new Mail(Mail::$TYPE_TICKET_MODIFY, null, $this->creator_language);
$mail->replaceInEmail(Mail::$TICKET_OWNER_KEY, $owner);
$mail->replaceInEmail(Mail::$TICKET_NUMBER_KEY, $this->id);
$mail->replaceInEmail(Mail::$TICKET_DESCRIPTION_KEY, $this->description);
$mail->replaceInEmail(Mail::$TICKET_PRIORITY_KEY, Ticket::DisplayPriority($this->priority));
$mail->replaceInEmail(Mail::$TICKET_STATUS_KEY, Ticket::getStatusDisplay($this->status));
$mail->replaceInEmail(Mail::$TICKET_TITLE_KEY, $this->title);
$mail->replaceInEmail(Mail::$TICKET_COMMENT_DESCRIPTION_KEY, $desc);
$mail->replaceInEmail(Mail::$TICKET_COMMENT_CREATOR_KEY, $owner_comment);
$mail->send($this->creator_email);
} catch (A2bMailException $e) {
$error_msg = $e->getMessage();
}
try {
$mail = new Mail(Mail::$TYPE_TICKET_MODIFY, null, $this->supportbox_language);
$mail->replaceInEmail(Mail::$TICKET_OWNER_KEY, $owner);
$mail->replaceInEmail(Mail::$TICKET_NUMBER_KEY, $this->id);
$mail->replaceInEmail(Mail::$TICKET_DESCRIPTION_KEY, $this->description);
$mail->replaceInEmail(Mail::$TICKET_PRIORITY_KEY, Ticket::DisplayPriority($this->priority));
$mail->replaceInEmail(Mail::$TICKET_STATUS_KEY, Ticket::getStatusDisplay($this->status));
$mail->replaceInEmail(Mail::$TICKET_TITLE_KEY, $this->title);
$mail->replaceInEmail(Mail::$TICKET_COMMENT_DESCRIPTION_KEY, $desc);
$mail->replaceInEmail(Mail::$TICKET_COMMENT_CREATOR_KEY, $owner_comment);
$mail->send($this->supportbox_email);
} catch (A2bMailException $e) {
$error_msg = $e->getMessage();
}
}