![]() |
|
#1
| |||
| |||
| Olá todos im tendo um problema com Pêra mail.php im recebendo esta mensagem de erro Erro fatal: Classe 'Correio' não foi encontrado na \ PEAR \ mail.php on-line 26 aqui é o meu código [php] <? php / / Referência a biblioteca PEAR Mail Mail.php require_once '; / / Classe principal, usado para obter informações de ordem, / / Run seções gasoduto, pedidos de auditoria, etc classe OrderProcessor ( public $ mOrderId; public $ mOrderStatus; public $ mConnection; public $ mConfiguration; public $ mContinueNow; private $ mCurrentCustomer; private $ mCurrentOrderDetails; private $ mOrderManager; private $ mRéférence; private $ mAuthCode; / / Construtor cria DoOrderManager instância function __construct () ( $ this-mOrderManager> = DoOrderManager novo (); ) / / O processo é chamado de checkout.php e orders_admin.php para processar um / Order /; o primeiro parâmetro é o ID da encomenda, ea segunda / / Parâmetro é uma instância OrderProcessorConfiguration. Processo de função pública (newConfiguration NewOrderID $, $) ( / / Set fim ID $ this-> mOrderId = $ NewOrderID; / / Processador configurar newConfiguration $ this-> mConfiguration = $; $ this-mContinueNow> = true; / / Início do registo da execução $ this-> AddAudit ( "Order Processor começou.", 10000); / / Obter o estatuto de ordem $ this-> mOrderStatus = $ this-> mOrderManager-> getOrderStatus ($ this-> mOrderId); / / Seção gasoduto processo tentar ( while ($ this-> mContinueNow) ( $ this-mContinueNow> = false; cps = $ this-> GetCurrentPipelineSection (); $ cps-> process ($ this); ) ) (Exception $ e) ( trigger_error ( 'exceção' ". $ e-> getMessage ()." sobre ". $ e-> getFile (). "Linha". $ e-> getLine ()); $ this-> MailAdmin ( "Ordem de erro de processamento ocured.", $ e-> getMessage ()); $ this-> AddAudit ( "Ordem de erro de processamento ocured.", 10002); Exception (erro do processador "); ) $ this-> AddAudit ( "Order Processor acabado.", 10001); ) / / Obtém uma instância do objeto que representa o ponto de pipeline atual GetCurrentPipelineSection função privada () ( switch ($ this-> mOrderStatus) ( case 0: $ this-mCurrentPipelineSection> = PsInitialNotification novo () break; case 1: $ this-mCurrentPipelineSection> = PsCheckFunds novo () break; case 2: $ this-mCurrentPipelineSection> = PsCheckStock novo () break; case 3: $ this-mCurrentPipelineSection> = PsStockOk novo () break; case 4: $ this-mCurrentPipelineSection> = PsTakePayment novo () break; case 5: $ this-mCurrentPipelineSection> = PsShipGoods novo () break; case 6: $ this-mCurrentPipelineSection> = PsShipOK novo () break; case 7: $ this-mCurrentPipelineSection> = PsFinalNotification novo () break; case 8: Exception ( "Ordem já foi concluída."); break; default: Exception (seção "pipeline Desconhecido solicitados."); ) ) / / Envia e-mail public function Mail (params, $ a, $ headers, $ message) ( / / Criar o objeto de correio usando o Mail:: factory method mail_object $ = Mail:: factory ( 'smtp', $ params); / / Testar o objeto de email é válido if (PEAR:: isError ($ mail_object)) Exception ($ mail_object-> getMessage ()); / / Envia e-mail $ result = $ mail_object-> send ($ to, $ headers, $ message); / / Teste se o email foi enviado com sucesso if (PEAR:: isError ($ result)) Exception ( "Não é possível enviar e-mail para R $ a".. $ result-> getMessage ()); ) / / Constrói mensagem de e-mail public function MailAdmin (mensagem $ assunto, $) ( / / Normalmente você não tem permissão para definir o 'From' header $ headers [ 'From'] = $ this-> mConfiguration-mOrderProcessorEmail>; $ headers [ 'Subject'] = $ assunto; $ headers [ 'To'] = $ this-> mConfiguration-mAdminEmail>; $ this-> mail ($ this-> mConfiguration-> mOrderProcessorEmailParams, $ this-> mConfiguration-mAdminEmail>, $ headers, $ message); ) / / Obtém o cliente que fez a ordem GetCurrentCustomer função pública () ( if (empty ($ this-> mCurrentCustomer)) ( $ this-mCurrentCustomer> = new Cliente ($ this-> mOrderManager-> GetCustomerByOrderId ($ this-> mOrderId)); if (empty ($ this-> mCurrentCustomer)) Exception ($ this-> mOrderId. "ordem não tem um cliente "); ) return $ this-> mCurrentCustomer; ) / / Obtém os detalhes da atual ordem GetCurrentOrderDetails função pública () ( if (empty ($ this-> mCurrentOrderDetails)) ( $ this-> mCurrentOrderDetails = new OrderDetails ($ this-> mOrderManager-> GetOrderDetails ($ this-> mOrderId)); if (empty ($ this-> mCurrentOrderDetails)) Exception ($ this-> mOrderId. "Não tem entrada de detalhes do pedido"); ) return $ this-> mCurrentOrderDetails; ) / / Adiciona mensagem de auditoria public function AddAudit (mensagem, $ messageNumber) ( $ this-> mOrderManager-> AddAudit ($ this-> mOrderId, mensagem, $ messageNumber); ) / / Atualiza o status do pedido UpdateOrderStatus função pública ($ newStatus) ( $ this-> mOrderManager-> UpdateOrderStatus ($ this-> mOrderId, $ newStatus); $ this-> mOrderStatus = $ newStatus; ) / / Conjunto de códigos para a autorização e referência do código public function SetOrderAuthCodeAndReference (newReference $ newAuthCode, $) ( $ this-> mOrderManager-> SetOrderAuthCodeAndReference ($ this-> mOrderId, $ newAuthCode, newReference $); newAuthCode $ this-> mAuthCode = $; newReference $ this-> mRéférence = $; ) / / Recebe o código para autorização e referência do código private function GetOrderAuthCodeAndReference () ( $ result = $ this-> mOrderManager-> GetOrderAuthCodeAndReference ( $ this-> mOrderId); if (empty ($ resultado)) Exception ($ this-> mOrderId. "não existe"); resultado $ this-> mAuthCode = $ [ 'auth_code']; resultado $ this-> mRéférence = $ [ 'referência']; ) / / Obtém o código de autorização para public function getAuthCode () ( if (empty ($ this-> mAuthCode)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mAuthCode; ) / / Obtém o código de referência para public function GetReference () ( if (empty ($ this-> mRéférence)) $ this-> GetOrderAuthCodeAndReference (); return $ this-> mRéférence; ) / / Definir a data da ordem de navio função pública SetDateShipped () ( $ this-> mOrderManager-> SetDateShipped ($ this-> mOrderId); ) ) ?> [/ php] Por favor, ajude alguém que será muito apreciada. vai tipo de louco. Muito obrigado |
|
#2
| ||||||||||||
| ||||||||||||
| Será que este obtenha resolvido?
__________________
http://www.geeklog.net/forum/viewtop...howtopic=75900 Discute-lo. Eu não utilizado qualquer Pear módulos sob o Windows, para tentar que é o seu melhor caminho a seguir. Meu Sistema: Tim
|
![]() |
|
| Marcadores |
Similar Threads | ||||
| Fio | Thread Starter | Fórum | Respostas | Última postagem |
| Ubuntu pelo correio | evilfantasy | Linux & Alternative SO | 7 | 30. De janeiro de 2009 14:37 |
| E-mail com vírus | bilsat | Vírus, spyware e Segurança | 2 | 29. De outubro de 2008 09:58 |
| Windows Mail | dfr200764 | E-mail, VoIP & IM Discussão | 4 | 20. De agosto de 2008 14:42 |
| Mail no abatimentos | Gazmondo | Hardware Geral Chat | 6 | 26. De fevereiro de 2008 17:01 |
| Correio problemas' | liamfi | E-mail, VoIP & IM Discussão | 3 | 1. De janeiro de 2008 09:44 |
| Thread Tools | |
| |