php - Not receiving emails [phpmailer] -
using phpmailer send email when fill form , click on submit. but, don't know why not sending email @ set address (n*****b@gmail.com)
code below:
<?php function notifiycustomeronnewordercreation($orderdetails, $order_id = '', $update = false) { global $wpdb; $orderhtml = makehtmlfromorderdetails($orderdetails); $order_link = admin_url('admin.php?page=cust_edit_order&id=' . str_replace("#", "*", $order_id)); $userid = $orderdetails->od("user_id"); $userdetails = $wpdb->get_results("select display_name,user_email {$wpdb->users} id ='{$userid}' limit 1"); global $phpmailer; // (re)create it, if it's gone missing if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'phpmailer' ) ) { require_once abspath . wpinc . '/class-phpmailer.php'; require_once abspath . wpinc . '/class-smtp.php'; $mail = new phpmailer( true ); } else { $mail = clone $phpmailer; } $mail->issendmail(); if($userdetails){ foreach($userdetails $ca){ try { $mail->addaddress($ca->user_email, $ca->display_name); $mail->addaddress('n*****b@gmail.com', 'navnish bhardwaj'); if($update){ $mail->subject = 'your order has been updated. ' . "[{$order_id}]"; $mail->altbody = 'to view message, please use html compatible email viewer!'; $mail->msghtml("your order has been updated.<br/><a href='{$order_link}'>view order</a><br/>" . $orderhtml); } else { $mail->subject = 'your order has been created. ' . "[{$order_id}]"; $mail->altbody = 'to view message, please use html compatible email viewer!'; $mail->msghtml("your order has been created.<br/><a href='{$order_link}'>view order</a><br/>" . $orderhtml); } $mail->send(); $mail->clearallrecipients(); } catch(phpmailerexception $e){ return false; } catch(exception $e){ return false; } } } return true; }
any suggestion appreciated.
i don't know you're asking for, assume want center div inside of parent container. that, div
must have width
smaller width of parent container (of course), must display: block
, , have margin: 0 auto
.
you can center element display: inline-block
or display: inline
using text-align: center
on parent element. center text inside well. think may want, since said wanted align center. put div
.
for example:
<div class="container"> <div class="centerthis"> lorem ipsum dolor sit amet... </div> </div>
css:
.container { } .centerthis { width: 50%; margin: 0 auto; }
or:
.container { text-align: center; } .centerthis { display: inline-block; /*or inline*/ width: 50%; }
Comments
Post a Comment