You get a bonus - 1 coin for daily activity. Now you have 1 coin

Mail.ru does not show image links in an HTML email

Practice



mail.ru does not show image links in an HTML email

I send it like this


require_once ('PHPMailer.php');
$topic = $_POST['tema'];

$message = $_POST['msg'];


$mail = new PHPMailer();
$mail->SetFrom($adressender);
$mail->AltBody = $message;
$mail->IsHTML(true);
$mail->AddAddress($adresresipient);
$mail->Body = $message;
$mail->Subject = $topic;

$mail->CharSet = "UTF-8";



if ($mail->Send())
{
echo $adresresipient . " sent ";
} else {

echo "error while sending";
}


At the same time I use TinyMCE

I get the textarea contents from the frame for ajax like this

var $textarea= $("#msg_ifr").contents().find("#tinymce").html();
$('textarea[name=msg]').html($textarea) ;




but in the body of the email only this arrives
Mail.ru does not show image links in an HTML email


instead ofMail.ru does not show image links in an HTML emailMail.ru does not show image links in an HTML email

most likely because of the attribute
mce_src


remove it before sending


$("#msg_ifr").contents().find("#tinymce").find('img').removeAttr("mce_src");

See also

  • [[b6841]]
  • [[b11166]]
  • [[b11329]]
  • [[b730]]
  • [[b8929]]
  • [[b11558]]
  • [[b5196]]
  • [[b11273]]
  • [[b6020]]
  • [[b11601]]
  • [[b11276]]
  • [[b11625]]
  • [[b11545]]
  • [[b11659]]
  • [[b11165]]
  • [[b4749]]
  • [[b11845]]
  • [[b6409]]
  • [[b5963]]
  • [[b4379]]

See also

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Computer networks"

Terms: Computer networks