0
은이 코드가 실패PHPMailer는 : IsHTML 사실이지만
$ 메일 -> 호스트 = gethostbyname까지도 ("TLS : //'.$dados [1] -> US_ENVIO_SMTP);
$mail->Port = $dados[1]->US_ENVIO_PORTA;
$mail->Username = $dados[1]->US_ENVIO_EMAIL;
$mail->Password = $dados[1]->US_ENVIO_SENHA;
$mail->SetFrom($dados[1]->US_ENVIO_EMAIL, $dados[1]->US_NOME);
$mail->AddReplyTo($dados[1]->US_ENVIO_EMAIL, $dados[1]->US_NOME);
$mail->Subject = $this->input->post('EM_ASSUNTO'); //Assunto do e-mail.
$mail->Body = $css.$this->input->post("EM_DESCRICAO")."<br>".$this->input->post("EM_CONTEUDO");
$mail->IsHTML(true);
본문은 CSS와 HTML로 설정되어 있습니다.
문제 :
<!--[if IE]><html xmlns="http://www.w3.org/1999/xhtml" class="ie-browser" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><![endif]--><!--[if !IE]><!--><!--<![endif]--> <!--[if gte mso 9]><xml> 96 </xml><![endif]--> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width"> <!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--> <title>E-mail template 1</title> <style type="text/css" id="media-query"> body { margin: 0; padding: 0; } table, tr, td { vertical-align: top; border-collapse: collapse; } .ie-browser table, .mso-container table { table-layout: fixed; } * { line-height: inherit; } a[x-apple-data-detectors=true] { color: inherit !important; text-decoration: none !important; } [owa] .img-container div, [owa] .img-container button { display: block !important; } [owa] .fullwidth button { width: 100% !important; } .ie-browser .col, [owa] .block-grid .col { display: table-cell; float: none !important; vertical-align: top; } .ie-browser .num12, .ie-browser .block-grid, [owa] .num12, [owa] .block-grid { width: 500px !important; } .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } .ie-browser .mixed-two-up .num4, [owa] .mixed-two-up .num4 { width: 164px !important; } .ie-browser .mixed-two-up .num8, [owa] .mixed-two-up .num8 { width: 328px !important; } .ie-browser .block-grid.two-up .col, [owa] .block-grid.two-up .col { width: 250px !important; } .ie-browser .block-grid.three-up .col, [owa] .block-grid.three-up .col { width: 166px !important; } .ie-browser .block-grid.four-up .col, [owa] .block-grid.four-up .col { width: 125px !important; } .ie-browser .block-grid.five-up .col, [owa] .block-grid.five-up .col { width: 100px !important; } .ie-browser .block-grid.six-up .col, [owa] .block-grid.six-up .col { width: 83px !important; } .ie-browser .block-grid.seven-up .col, [owa] .block-grid.seven-up .col { width: 71px !important; } .ie-browser .block-grid.eight-up .col, [owa] .block-grid.eight-up .col { width: 62px !important; } .ie-browser .block-grid.nine-up .col, [owa] .block-grid.nine-up .col { width: 55px !important; } .ie-browser .block-grid.ten-up .col, [owa] .block-grid.ten-up .col { width: 50px !important; } .ie-browser .block-grid.eleven-up .col, [owa] .block-grid.eleven-up .col { width: 45px !important; } .ie-browser .block-grid.twelve-up .col, [owa] .block-grid.twelve-up .col { width: 41px !important; } @media only screen and (min-width: 520px) { .block-grid { width: 500px !important; } .block-grid .col { display: table-cell; Float: none !important; vertical-align: top; } .block-grid .col.num12 { width: 500px !important; } .block-grid.mixed-two-up .col.num4 { width: 164px !important; } .block-grid.mixed-two-up .col.num8 { width: 328px !important; } .block-grid.two-up .col { width: 250px !important; } .block-grid.three-up .col { width: 166px !important; } .block-grid.four-up .col { width: 125px !important; } .block-grid.five-up .col { width: 100px !important; } .block-grid.six-up .col { width: 83px !important; } .block-grid.seven-up .col { width: 71px !important; } .block-grid.eight-up .col { width: 62px !important; } .block-grid.nine-up .col { width: 55px !important; } .block-grid.ten-up .col { width: 50px !important; } .block-grid.eleven-up .col { width: 45px !important; } .block-grid.twelve-up .col { width: 41px !important; } } @media (max-width: 520px) { .block-grid, .col { min-width: 320px !important; max-width: 100% !important; } .block-grid { width: calc(100% - 40px) !important; } .col { width: 100% !important; } .col > div { margin: 0 auto; } img.fullwidth { max-width: 100% !important; } } </style> <!--[if mso]> <body class="mso-container" style="background-color:#FFFFFF;"> <![endif]--> <!--[if !mso]><!--> <!--<![endif]-->
<!--[if (mso)|(IE)]>
<![endif]-->
<!--[if (mso)|(IE)]>
<![endif]--> <!--[if (mso)|(IE)]> <![endif]-->
<!--[if (!mso)&(!IE)]><!-->
<!--<![endif]-->
<!--[if mso]>
<![endif]--> Image <!--[if mso]>
<![endif]-->
<!--[if (!mso)&(!IE)]><!-->
<!--<![endif]-->
<!--[if (mso)|(IE)]> <![endif]-->
<!--[if (!mso)&(!IE)]><!-->
<!--<![endif]--> <!--[if mso]>
<![endif]-->
(51) 9991-2580
<!--[if mso]>
<![endif]--> <!--[if (!mso)&(!IE)]><!-->
<!--<![endif]-->
<!--[if (mso)|(IE)]>
<![endif]-->
<!--[if (mso)|(IE)]>
<![endif]--> <!--[if (mso)|(IE)]> <![endif]-->
<!--[if (!mso)&(!IE)]><!-->
<!--<![endif]--> <!--[if (!mso)&(!IE)]><!-->
<!--<![endif]-->
<!--[if (mso)|(IE)]>
누구든지이 문제를 가지고 :
Gmail에서이 같은 모든 코드를 수신한다? 사용하여 고정 할 수 있습니다
$body = $this->input->post('html_field');
:
그래서 'Body'에 넣어야합니다. 코드에 다른 내용이 표시되지 않습니다. – Synchro
@ 싱크로 코드는 길다.이 부분은 CSS, 이미지가있는 HTML, 재미있는 부분은 HTML의 일부 작업이다. 30 일 전, 같은 코드가 사용되었습니다. –
'msgHtml' 함수 이외에 PHPMailer는 메시지 본문을 만지지 않습니다. 'Body'에 넣은 것은 전송되는 것이므로 넣고있는 것을 확인하십시오. – Synchro