0
當Description與附件一起增加超過3000個字符時,我無法發送電子郵件。這裏是示例代碼。在Codeigniter中使用SMTP發送詳細說明以及附件
$mail->IsSMTP(); //send via SMTP
$mail->Host = SMTP_HOST; //SMTP servers
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = SMTP_HOST; //SMTP servers
$mail->Port = 25;
$mail->Username = USER_NAME;
$mail->Password = USER_PWD;
$mail->From = $from_email;
$mail->FromName = $from_name;
$mail->ContentType = "text/html";
$mail->WordWrap = 180; // set word wrap
$mail->CharSet = 'UTF-8';
$mail->IsHTML(true);
$mail->AddAddress($to_add, $to_name);
$mail->Subject = "Tutorial get Answered";
$HTML = "<p>Your tutorial is ready now,</p>";
$HTML .= "<p>Question ID: " . $q_id. "</p>";
$HTML .= "<p>Question : " . $row['description'] . "</p>";
$HTML .= "<p>Posted on: " . $row['created_on'] . "</p>";
$HTML .= "<p><a href=base_url().'/" . $row['id'] . "/" . my_text($row['description']) . "'>SHOW TUTORIAL</a></p>";
$HTML .= "<p><br><br>Thank you.</p>";
$mail->Body=$HTML;
$mail->Send();
$msg="Mail send into your email";
它工作正常對於小的描述,但如果描述增加它顯示郵件發送但它不顯示在收件箱中。
附上代碼示例和詳細的錯誤描述。 –