From: <ex...@us...> - 2013-05-12 13:42:26
|
Revision: 5956 http://sourceforge.net/p/web-erp/reponame/5956 Author: exsonqu Date: 2013-05-12 13:42:23 +0000 (Sun, 12 May 2013) Log Message: ----------- 12/5/2013 Exson: Fixed the bug of not use strpos correctly in PO_PDFPurchOrder.php. Modified Paths: -------------- trunk/PO_PDFPurchOrder.php Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2013-05-12 13:23:26 UTC (rev 5955) +++ trunk/PO_PDFPurchOrder.php 2013-05-12 13:42:23 UTC (rev 5956) @@ -325,27 +325,16 @@ //since sometime the mail server required to verify the users, so must set this information. if($_SESSION['SmtpSetting'] == 0){//use the mail service provice by the server. $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>'); - $MailMethod = 'mail'; + $Success = $mail->send(array($_POST['EmailTo'])); }else if($_SESSION['SmtpSetting'] == 1) { - if(strpos('@',$_SESSION['SMTPSettings']['username'])){//user has set the fully mail address as user name - $mail->setFrom($_SESSION['SMTPSettings']['username']); - }else{//user only set it's name instead of fully mail address - if(strpos('smtp',$_SESSION['SMTPSettings']['host'])){ - $HostDomain = substr($_SESSION['SMTPSettings']['host'],4); - } - if(!strpos('@',$_SESSION['SMTPSettings']['username'])){ - $SendFrom = $_SESSION['SMTPSettings']['username'].$HostDomain; - } - } - $mail->setFrom($SendFrom); - $MailMethod = 'smtp'; + $Success = SendmailBySmtp($mail,array($_POST['EmailTo'])); + }else{ prnMsg(_('The SMTP settings are wrong, please ask administrator for help'),'error'); exit; include('includes/footer.inc'); } - $Success = $mail->send(array($_POST['EmailTo']),$MailMethod); if ($Success == 1) { $Title = _('Email a Purchase Order'); include('includes/header.inc'); |