![]() |
|
#1
| |||
| |||
| Ciao tutti im aver un problema con Pera mail.php im ottenere questo messaggio di errore Errore fatale: Classe 'Mail' non si trovano in \ PEAR \ mail.php on-line 26 qui è il mio codice [php] <? php / / Riferimento alla libreria PEAR Mail mail.php require_once ''; / / Classe principale, utilizzato per ottenere informazioni sugli ordini, / / Run tratti di metanodotti, gli ordini di revisione, ecc classe OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mReference; private $ mAuthCode; / / Costruttore crea un'istanza DoOrderManager function __construct () ( $ this-> mOrderManager = DoOrderManager new (); ) / / Processo è chiamato da checkout.php e orders_admin.php a elaborare un / / Fine, il primo parametro è l'ID dell'ordine, e la seconda / / Parametro è un 'istanza OrderProcessorConfiguration. processo di funzione pubblica (newConfiguration $ newOrderId, $) ( / / Set per ID $ this-> mOrderId = $ newOrderId; / / Processore configure $ this-> mConfiguration = $ newConfiguration; $ this-> mContinueNow = true; / / Start log di esecuzione $ this-> AddAudit ( "Order Processor iniziato.", 10000); / / Ottenere lo status di ordine $ this-> mOrderStatus = $ this-> mOrderManager-> GetOrderStatus ($ this-> mOrderId); / / Sezione tubazioni di processo provare ( while ($ this-> mContinueNow) ( $ this-> mContinueNow = false; cps = $ this-> GetCurrentPipelineSection (); $ cps> process ($-presente); ) ) catch (Exception $ e) ( trigger_error ( 'Exception "'. $ e-> getMessage (). '" a'. $ e-> getFile (). "Linea". $ e-> getLine ()); $ this-> MailAdmin ( "Ordine di errore di elaborazione ocured.", $ e-> getMessage ()); $ this-> AddAudit ( "Ordine di errore di elaborazione ocured.", 10002); throw new Exception ( "Error Processor"); ) $ this-> AddAudit ( "Order Processor finito.", 10001); ) / / Ottiene un'istanza di un oggetto che rappresenta la sezione corrente pipeline GetCurrentPipelineSection private function () ( switch ($ this-> mOrderStatus) ( case 0: $ this-> mCurrentPipelineSection = PsInitialNotification new (); break; Caso 1: $ this-> mCurrentPipelineSection = PsCheckFunds new (); break; Caso 2: $ this-> mCurrentPipelineSection = PsCheckStock new (); break; Caso 3: $ this-> mCurrentPipelineSection = PsStockOk new (); break; case 4: $ this-> mCurrentPipelineSection = PsTakePayment new (); break; case 5: $ this-> mCurrentPipelineSection = PsShipGoods new (); break; case 6: $ this-> mCurrentPipelineSection = PsShipOK new (); break; case 7: $ this-> mCurrentPipelineSection = PsFinalNotification new (); break; case 8: throw new Exception ( "Ordine è già stata completata."); break; default: throw new Exception (sezione "pipeline Unknown richiesti."); ) ) / / Invia e-mail public function Mail ($ params, $ a, $ headers, $ message) ( / / Crea l'oggetto utilizzando la posta elettronica Mail:: metodo factory mail_object $ = Mail:: factory ( 'smtp', $ params); / / Test l'oggetto di posta elettronica è valido if (PEAR:: isError ($ mail_object)) throw new Exception ($ mail_object-> getMessage ()); / / Invia e-mail $ risultato = $ mail_object-> send ($ a, $ headers, $ message); / / Test se la posta è stata inviata con successo if (PEAR:: isError ($ risultato)) throw new Exception ( "Impossibile inviare e-mail a $ to.". $ result-> getMessage ()); ) / / Costruisce messaggio e-mail public function MailAdmin ($ message subject, $) ( / / Di solito non ti è permesso di impostare il 'From' header $ headers [ 'From'] = $ this-> mConfiguration-> mOrderProcessorEmail; $ headers [ 'Subject'] = $ soggetto; $ headers [ 'To'] = $ this-> mConfiguration-> mAdminEmail; $ this-> mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-> mAdminEmail, $ headers, $ message); ) / / Ottiene il cliente che ha fatto l'ordine GetCurrentCustomer public function () ( if (empty ($ this-> mCurrentCustomer)) ( $ this-> mCurrentCustomer = new Cliente ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) throw new Exception ($ this-> mOrderId. "ordine non ha ancora una cliente "); ) return $ this-> mCurrentCustomer; ) / / Ottiene i dettagli del provvedimento in corso GetCurrentOrderDetails public function () ( if (empty ($ this-> mCurrentOrderDetails)) ( $ this-> mCurrentOrderDetails = new OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (empty ($ this-> mCurrentOrderDetails)) throw new Exception ($ this-> mOrderId. "Non ha voce dettagli ordine"); ) return $ this-> mCurrentOrderDetails; ) / / Aggiunge il messaggio di controllo public function AddAudit ($ message, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, $ messaggio, $ messageNumber); ) / / Aggiorna lo stato degli ordini UpdateOrderStatus public function ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus); $ this-> mOrderStatus = $ newStatus; ) / / Imposta il codice dell'ordine di autorizzazione e un codice di riferimento public function SetOrderAuthCodeAndReference (newReference $ newAuthCode, $) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ newAuthCode, $ newReference); $ this-> mAuthCode = $ newAuthCode; $ this-> mReference = $ newReference; ) / / Ottiene il codice di autorizzazione ordine e un codice di riferimento Private Function GetOrderAuthCodeAndReference () ( $ risultato = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); if (empty ($ result)) throw Exception ($ this-> mOrderId. "non esiste"); $ this-> mAuthCode = $ result [ 'auth_code']; $ this-> mReference = $ result [ 'di riferimento']; ) / / Ottiene il codice di autorizzazione per public function GetAuthCode () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / Ottiene il codice di riferimento dell'ordine public function GetReference () ( if (empty ($ this-> mReference)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mReference; ) / / Impostare la data dell'ordine nave funzione pubblica SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Si prega di aiutare qualcuno che sarà molto apprezzato. che tipo di matti. Grazie molto |
|
#2
| ||||||||||||
| ||||||||||||
| Ha risolto ottenere questo?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 si discute. Non ho usato qualsiasi Pera moduli sotto Windows in modo cercando è la vostra strada migliore da seguire. Il mio sistema: Tim
|
![]() |
|
| Segnalibri |
Threads simili | ||||
| Filo | Thread Starter | Forum | Risposte | Ultimo Post |
| Ubuntu per posta | evilfantasy | Linux e OS alternativi | 7 | 30 gen 2009 14:37 |
| E-mail con virus | bilsat | Virus, Spyware e sicurezza | 2 | 29 Ott 2008 09:58 |
| Windows Mail | dfr200764 | E-mail, messaggistica istantanea e VoIP Discussione | 4 | 20 Ago 2008 14:42 |
| Mail degli sconti | Gazmondo | Hardware Generale Chat | 6 | 26 Feb 2008 17:01 |
| Mail problemi ' | liamfi | E-mail, messaggistica istantanea e VoIP Discussione | 3 | 1 ° gennaio 2008 09:44 |
| Thread Tools | |
| |