2016-06-24 1 views
0

이메일이 전송되지 않았습니다. MDaemon 설정이 완료되었지만 메일이 전송되지 않았으며 PHP 파일이나 다른 구성이 필요하지 않습니다. 완료되었습니다. MDeamoen 설정이 완료되었지만 메일이 전송되지 않았습니다. 무엇보다 나는 PHP에 새로운 오전 MDeamon 필요한
코드 :이메일을 보내지 못했습니다. mdaemon 설정이 완료되었지만 메일이 전송되지 않고 오류가 발생하지 않습니다. php 파일

// smtp domain name 
    ini_set("SMTP","48.48.48.250"); 

    //sendmail path for sending email 
    ini_set("sendmail_path", "M:\MDaemon\App\MDaemon.exe\ -t -i"); 

    // Please specify an SMTP Number 25 and 8889 are valid SMTP Ports. 

    ini_set("smtp_port","25"); 

    // Please specify the return address to use 

    ini_set('sendmail_from', '[email protected]'); 





    // multiple recipients 
    $to = '[email protected]' . ', '; // note the comma 
    $to .= '[email protected]'; 

    // subject 
    $subject = 'Birthday Reminders for August'; 

    // message 
    $message = ' 
    <html> 
    <head> 
     <title>Birthday Reminders for August</title> 
    </head> 
    <body> 
     <p>Here are the birthdays upcoming in August!</p> 
     <table> 
     <tr> 
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th> 
     </tr> 
     <tr> 
      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> 
     </tr> 
     <tr> 
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td> 
     </tr> 
     </table> 
    </body> 
    </html> 
    '; 

    // To send HTML mail, the Content-type header must be set 
    $headers = 'MIME-Version: 1.0' . "\r\n"; 
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 

    // Additional headers 
    $headers .= 'To: Mukesh <[email protected]>, Kelly <[email protected]>' . "\r\n"; 
    $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n"; 


    // Mail it 
    if(mail($to, $subject, $message, $headers)) 
     { 
     echo 'Email sent successfully!'; 
    } 
    else 
    { 

     die('Failure: Email was not sent!'); 

    } 

    /* Code running properly and sent msg successfully but mail not sent if any idea about MDeamon or I have to other Configuration done on localhost that should be run properly and send mail success *? 

답변

0

난 당신이 미스 구성을 생각한다.

blog 공식 여기 또한 video tutorial

그냥 간단한 텍스트 이메일을 시도 참조 참조하십시오 간단한 이메일이 다음 작업하면

<?php 
$to  = '[email protected]'; 
$subject = 'the subject'; 
$message = 'hello'; 
$headers = 'From: [email protected]' . "\r\n" . 
    'Reply-To: [email protected]' . "\r\n" . 
    'X-Mailer: PHP/' . phpversion(); 

mail($to, $subject, $message, $headers); 
?> 

당신은 PEAR 패키지»PEAR를 설치 :: Mail_Mime이 필요합니다.

참고 : HTML 또는 다른 복잡한 메일을 보내도록하려는 경우가 PEAR 패키지»PEAR::Mail_Mime를 사용하는 것이 좋습니다 입니다.

+0

로컬 호스트에서 메일을 보낼 때 제대로 보낸 메일보다 MDaemon 경로를 사용하는 경우에도 메시지가 전송되지 않은 경우 메일이 성공적으로 전송되었습니다. –

관련 문제