從PHP發送郵件時,我的HTML有一個奇怪的問題。超鏈接不顯示,因爲他們應該。這是如何呈現我的電子郵件客戶端:從PHP發送HTML郵件時無法正常工作
正如你所看到的,有2個變量的字符串發送到電子郵件正文:
$texto_msg = 'HOLA <a href="http://vendoan.com">ANCHOR</a>';
$url_anuncio = 'Sal bien!!: <a href="'.get_permalink($post_tmp).'">Título: '.get_the_title($post_tmp).'</a>';
$e_subject = __('Alguien se ha interesado por tu anuncio en VendoAndroid','jigowatt');
// Advanced Configuration Option.
// You can change this if you feel that you need to.
// Developers, you may wish to add more fields to the form, in which case you must be sure to add them here.
$msg = __('¡Hola! Un usuario de VendoAndroid se ha interesado en tu anuncio:'). PHP_EOL . PHP_EOL;
//$msg .= __('<a href="'.get_permalink($post_tmp).'">Título: '.get_the_title($post_tmp).'</a>') . PHP_EOL . PHP_EOL;
$msg .= __($texto_msg) . PHP_EOL;
$msg .= __($url_anuncio) . PHP_EOL;
$msg .= implode(PHP_EOL, $comments) . PHP_EOL . PHP_EOL;
$msg .= "-------------------------------------------------------------------------------------------\r\n";
$msg .= 'Mensaje enviado desde <a href="http://vendoandroid.com" ><strong>VendoAndroid.com</strong></a>';
$msg = wordwrap($msg, 70);
我不明白爲什麼第一鏈接運作良好,而不是第二個。
任何想法?
謝謝
更新:
@Joachim伊薩克森,這是原始來源:
<p>¡Hola! Un usuario de VendoAndroid se ha interesado en tu anuncio:</p>
<p>TÃtulo: <strong>Puto Firefox jodio</strong><br />
<a href="http://vendoandroid.com/mis-anuncios/"><strong>área de<br />
usuario.</strong></a><br />
Puedes ver, editar o eliminar tu anuncios accediendo a tu <a<br />
href="http://vendoandroid.com/mis-anuncios/"><strong>área de<br />
usuario.</strong></a><br />
什麼是__()??? – keyboardSmasher
請使用「查看源代碼」,並自行檢查帶有功能失調的href標籤的行,或者將其添加到您的問題中。我懷疑'get_permalink()'可能會返回一些意想不到的結果。 –
應該知道這是wordpress ... bleh。 – keyboardSmasher