使用PHP通过email()发送的电子邮件中的文本方向和对齐方式

vli*_*o20 5 html php email alignment hebrew

我通过PHP发送自动电子邮件.该电子邮件包含希伯来语,其方向是从右到左.这是我编写消息正文部分的代码:

            $emailMessage ='
            <html lang="HE">
                <head>
                <title>
                    job-skills | ???????
                </title>
                </head>
                <body style="text-align:right; direction:rtl;">
                    <table>
                        <tr>
                            <td><h3>???? ?? ????????</h4></td>
                        </tr>
                        <tr>
                            <td>?? ??? ?????? ????? ???? ???? ???? ?? ????? ???:</td>
                        </tr>
                        <tr>
                            <td><a href="http://localhost/W-DB/php/registration_and_login/confirm_registration.php?email=' .$registrationEmail .'&tempPass=' . $tempPass . '>??? ???</a></td>
                        <tr>
                        </tr>
                        <tr>
                            <td>?????,</td>
                        </tr>
                        <tr>
                            <td><h2>JOb-Skills</h2></td>
                        </tr
                    </table>
                </body>
            </html>
Run Code Online (Sandbox Code Playgroud)

文本仍然左对齐,左右对齐.

小智 9

这是我的代码:

<?php 
$to ="mail id";
$from = "mail id";
$sub = "Hebrew";
$message = '<html lang="HE">
                <head>
                <title>
                    job-skills | ???????
                </title>
                </head>
                <body style="text-align:right; direction:rtl;">
                    <table>
                        <tr>
                            <td><h3>???? ?? ????????</h4></td>
                        </tr>
                        <tr>
                            <td>?? ??? ?????? ????? ???? ???? ???? ?? ????? ???:</td>
                        </tr>
                        <tr>
                            <td>
    <a href="#">??? ???</a></td>
                        <tr>
                        </tr>
                        <tr>
                            <td>?????,</td>
                        </tr>
                        <tr>
                            <td><h2>JOb-Skills</h2></td>
                        </tr
                    </table>
                </body>
            </html>';
$headers = "From:" . $from;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
if(mail($to,$sub,$message,$headers)) echo "success";



?>
Run Code Online (Sandbox Code Playgroud)