2012-03-21 5 views
0

phpメーラークラスを使用してメールを送信しました。メールは正常に送信されましたが、私は「ロゴ1」としてメールの内容を取得しました。次のコードを使用しています...誰が私はこれがあなたがphpメーラを使用してメールを送信中に発生する

$mail = new phpmailer(); 
$mail->IsHTML(true); 

感謝をphpmailerのクラスのオブジェクトを作成するときに

+1

main_content.phpの内容は何ですか? – Magic

+0

私はこのコメントを+1します:あなたのメールが正しく送信された場合、あなたの問題は内容に関するものです。 htmlヘッダーを追加するのを忘れた場合は、HTMLの問題になることもあります – haltabush

答えて

2

代わりに$mail_body = include_once('mail_content.php'); と書いてはいけません。

include_once 'editors/tinymce.php'; 
$to = '[email protected]'; 
$frm = '[email protected]'; 
$sub = 'Weekly Working Report'; 

    ob_start(); // start output buffering 
    include_once('mail_content.php'); 
    $mail_body = ob_get_contents(); // get the contents from the buffer 
    ob_end_clean(); 

$mailstatus = l_mail('', '', $to, '', $frm, '', $sub, $mail_body); 

if ($mailstatus == 'ok') { 
    echo '<center><font color=red style="font-size:14px">Message has been sent Succesfully.....!</font></center><br>'; 
} else { 
    echo $mailstatus; 
} 
+0

soooたくさんありがとうございます:) – Natasha

0
$to = "[email protected]"; 
$subject = "Hey keep belief in me!"; 
$body = "Hi,\n\nHow are you?\n\n be good do good"; 
$header="[email protected]"; 
if (mail($to, $subject, $body, $header)) { 
    echo("<p>Message successfully sent!</p>"); 
    } else { 
    echo("<p>Message delivery failed...</p>"); 
    } 

を助けてください

0

は、以下のコードを使用して作品を願ってい

<? 
include_once 'editors/tinymce.php'; 
$to = '[email protected]'; 
$frm = '[email protected]'; 
$sub = 'Weekly Working Report'; 

$mail_body = include_once('mail_content.php'); 
$mailstatus = l_mail('', '', $to, '', $frm, '', $sub, $mail_body); 

if ($mailstatus == 'ok') { 
    echo '<center><font color=red style="font-size:14px">Message has been sent Succesfully.....!</font></center><br>'; 
} else { 
    echo $mailstatus; 
} 
?> 
関連する問題