PHP 메일 기능을 사용하여 HTML 텍스트를 보내고 있습니다.PHP 메일 기능을 사용하여 문자 전송 메일을 정렬하려고합니다.
mail($recipient,$subject,$msg,$mailheaders);
내가 이메일을 수신하지만, 모든 텍스트가 왼쪽 정렬됩니다 :
그래서 텍스트는 내가 좋아하는 메일 기능을 사용하고$msg='<h1>This is the mail text i want to center</h1>';
입니다.
는 스타일 속성을$msg='<h1 style="text-align:center;">This is the mail text i want to center</h1>';
그러나 다시 행운을 사용하려고 (가 허용되지 않습니다?) 나는 중앙 태그
$msg='<center><h1>This is the mail text i want to center</h1></center>';
을 사용하려하지만 메일은 결코 간다. 어떤 아이디어라도 환영합니다.
. 또한 phpmailer와 같은 제 3 자 라이브러리를 사용하여 더 잘 처리 할 수 있습니다. – Akintunde007
@Akintunde "헤더의 html로 지정해야합니다."어떻게해야합니까? – xbass540
$ mailheaders 변수 표시 – Akintunde007